JavaEE doctype references in xml descriptors



I use glassfish4 and apache tiles and I have the following descriptor - tiles.xml



<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
"http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
<tiles-definitions>
....
</tiles-definitions>


Everything is working. The problem appears when internet is off. Than I get the following error:



Parse Fatal Error at line 1 column 3: The markup declarations contained or pointed to by the document type declaration must be well-formed. org.xml.sax.SAXParseException; systemId: http://tiles.apache.org/dtds/tiles-config_3_0.dtd; lineNumber: 1; columnNumber: 3; The markup declarations contained or pointed to by the document type declaration must be well-formed.



The problem is that it can't get tiles-config_3_0.dtd as internet doesn't work. I have this file in tiles-core.jar osgi bundle. My question - how can I make glassfish read this file from osgi bundle but not from internet.


No comments:

Post a Comment