DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=33570>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33570 Summary: A DTD defined in an XML file requires an Internet connection Product: Struts Version: 1.2.4 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Tiles framework AssignedTo: dev@struts.apache.org ReportedBy: [EMAIL PROTECTED] When I use the Tiles plug-in in Struts, if a configuration XML file contains an external URL for a DTD specification, the Web application does not load properly if an Internet connection is not present. This problem does not occur with Struts 1.1. For example, the following excerpt from my Struts configuration file: <plug-in className="org.apache.struts.tiles.TilesPlugin" > <set-property property="definitions-config" value="/WEB-INF/config/generic-tiles-defs.xml, /WEB-INF/config/base-tiles-defs.xml, /WEB-INF/config/tiles-defs.xml" /> <set-property property="moduleAware" value="true" /> </plug-in> refers to the generic-tiles-defs.xml, which begins as follows: <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration//EN" "http://jakarta.apache.org/struts/dtds/tiles-config.dtd"> If no Internet connection is present, an UnknownHostException is thrown when Digester tries to open the URLConnection associated to the above URL. Maybe this exception occurred in previous versions of Struts, but now it is not managed properly anymore. As a result, this error prevents the Web application from loading and working correctly. The exception stack trace begins as follows: javax.servlet.ServletException: IO Error while parsing file '/WEB-INF/config/generic-tiles-defs.xml'. jakarta.apache.org at org.apache.struts.tiles.TilesPlugin.initDefinitionsFactory(TilesPlugin.java:235) at org.apache.struts.tiles.TilesPlugin.init(TilesPlugin.java:139) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332) at ca.ulaval.fsa.drdb.dbfw.webapp.controller.struts.DbActionServlet.init(DbActionServlet.java:18) [...] The IO error message comes from the parseXmlFile method of the org.apache.struts.tiles.xmlDefinition.I18nFactorySet. The exception is thrown by the xmlParser.parse(input, xmlDefinitions) method call at the end of the try clause. The related libraries I use are Commons BeanUtils 1.7.0, Collections 3.1, Digester 1.6, Logging 1.0.4. As mentioned above, if I use Struts 1.1 (and deactivate my Struts 1.2-specific code) without changing any other libraries, everything works properly. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]