This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts, XML and DTD linking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts, XML and DTD linking" Watch "Struts, XML and DTD linking" New topic

Struts, XML and DTD linking

Dmitry Dzifuta

Joined: Oct 19, 2004
Posts: 1
I have the problem about standard xml files for struts application. The only thing I want is to launch standard application "struts-blank". All xml files have links to dtd files on the struts and java servers that is why Tomcat gives me an error that he can't establish connection (I use proxy and tomcat or xerses tries to establish direct connection). I wrote doctype in this way:
<!DOCTYPE struts-config SYSTEM "struts-config_1_2.dtd">

Now I got an error for Tomcat 4.1.29:
2004-10-19 10:36:56 ContextConfig[/struts-blank] Parse error in application web.xml
at java.util.Hashtable.get(
at org.apache.catalina.util.xml.XmlMapper.resolveEntity(
at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntity(
at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalSubset(
at org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(
at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(
at org.apache.xerces.framework.XMLDocumentScanner.access$0(
at org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(
at org.apache.xerces.framework.XMLParser.parse(
at org.xml.sax.helpers.XMLReaderAdapter.parse(
at javax.xml.parsers.SAXParser.parse(
at javax.xml.parsers.SAXParser.parse(
at org.apache.catalina.util.xml.XmlMapper.readXml(

This error happens if I write so:
<!DOCTYPE struts-config SYSTEM "/WEB-INF/struts-config_1_2.dtd">

I have tried all possible variants but system tries to get dtd file from external resource. Please, help me with this problem or give me a link where I can read about xerses. Thanks a lot.
I agree. Here's the link:
subject: Struts, XML and DTD linking
Similar Threads
Struts example
Split web.xml into smaller manageable xml files
Parsing a XML file containing japanese characters
Correct DOCTYPE definitions for web-app, Struts, Tiles
Bizarre Problem related to Struts-config.xml : Improper format