Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts, XML and DTD linking

 
Dmitry Dzifuta
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:333)
at org.apache.catalina.util.xml.XmlMapper.resolveEntity(XmlMapper.java:441)
at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntity(DefaultEntityHandler.java:755)
at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalSubset(DefaultEntityHandler.java:571)
at org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScanner.java:1139)
at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentScanner.java:2145)
at org.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentScanner.java:2100)
at org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XMLDocumentScanner.java:831)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:314)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:89)
at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:275)

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic