Specifying a particular struts-config.dtd file
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sam_Lambert
Posted On:   Wednesday, October 6, 2004 09:16 AM

My application currently uses Struts, and I recently modified both it and my struts-config.xml to use the "message-resources" tag. Now, when I start Tomcat, I get two errors for every message-resources tag I use: Oct 6, 2004 9:00:26 AM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 3053 column 61: Element type "message-resources" must be declared. org.xml.sax.SAXParseException: Element type "message-resources" must be declared. Oct 6, 2004 9:00:26 AM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 3056 column 17: The content of element type "struts-config" must match "(data-sources?,form-beans?,global-forwards?,   More>>

My application currently uses Struts, and I recently modified both it and my struts-config.xml to use the "message-resources" tag. Now, when I start Tomcat, I get two errors for every message-resources tag I use:


Oct 6, 2004 9:00:26 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 3053 column 61: Element type "message-resources" must be declared.
org.xml.sax.SAXParseException: Element type "message-resources" must be declared.


Oct 6, 2004 9:00:26 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 3056 column 17: The content of element type "struts-config" must match "(data-sources?,form-beans?,global-forwards?,action-mappings?)".


It appears this is due to the 1.0 struts-config.dtd file lacking the tag definition. However, my struts-config.xml file specifies "http://struts.apache.org/dtds/struts-config_1_1.dtd" as the DTD file to use, and the message tag is defined in 1.1. Both "1_0" and "1_1" DTDs exist in the struts.jar file I deploy.


I was able to get rid of the errors by removing the 1_0 DTD file from the jar, but this is a hack, and I prefer to do things in a non-hacked manner whenever possible.


Is there some way that I can specify which DTD file to select from the jar, and avoid these errors?


Thanks in advance,


-- Sam


P.S. Yes, I plan to upgrade to 1.2, and have already started the process, but that's a topic for another post...

   <<Less
About | Sitemap | Contact