Hi everybody.
I am trying to include an additional attribute (which I want to use in my
application) in the <action> tag in struts-config.xml.
I had to do three things:
1. I subclassed ActionMapping and provided a getter and setter method for this
additional attribute.
2. I specified the new subclass to be the ActionMapping class for the
ActionServlet in web.xml
3. I needed to change the DTD for struts-config.xml, so the XML parser would
accept this additional parameter.
This works pretty well, as long as I am modifying the DTD in the standard
location /org/apache/struts/resources/struts-config_1_0.dtd in the struts.jar
file. But I really don't want to do this, because then I have to patch around in
the struts-code each time I want to update to a newer struts verson. What I
really want to do is to specify an alternative DTD in struts-conig.xml. But I
couldn't get it to work.
This is what I specified:
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"file:/home/matthias/Kunden/BoersenMedienAG/nmi-registration/etc/struts-config_1_0.dtd">
But obvously the parser still goes for the DTD in the standard location in the
struts.jar file. I also don't get an error message when I specify a path wich
does not exist.
Can somebody help me out?
Thanks,
--- Matthias