struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Adding my own attribute to a forward tag in the struts-config.xml
Date Tue, 13 Apr 2004 15:15:05 GMT
Hi gurus.

I added my own attribute to forward tags and modified some 
struts source codes.
The forward tag is like below ( the attribute "user" is my own
<action ...>
   <forward name="success" path="/test.jsp" user="ROOT" />

when I start tomcat, it works fine as I expect with the modified struts 
source code.
But in the log(log4j) file, I get the following ERRORs. 
org.xml.sax.SAXParseException: Attribute "user" must be declared for element type "forward".
Although the modified struts works as I expect, I want the log go away.

I thought the reason why the error was caused is that the struts-config file and DTD(struts-config_1_1.dtd)
 don't match.
so I extracted struts-config_1_1.dtd from the struts.jar and modified it to allow user attribute

in a forward tag and saved under WEB-INF directory. and I changed struts-config's DOCTYPE
to the 
<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"

but still getting the same errors. 

I don't know why but I think that the struts-config_1_1.dtd might not be read or found by

Where should I save the new struts-config_1_1.dtd ? Should I put the new dtd file back to
struts.jar file ?? I even tried to save the DTD file under WEB-INF/classes/org/apache/struts/resources

directory because the DTD was found under the directory in the struts.jar file.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message