File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes struts dont work with web xml DTD 2.4? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts dont work with web xml DTD 2.4?" Watch "struts dont work with web xml DTD 2.4?" New topic
Author

struts dont work with web xml DTD 2.4?

Manzar Zaidi
Ranch Hand

Joined: Oct 21, 2004
Posts: 43
This confuses me . I try to setup struts with my DD conforming to 2.4 DTD and I get an error that it was unable to parse the struts config file.

Same setup but with a 2.2 DTD works fine.

All over the web any samples I can find for struts use 2.2 DTD and not 2.4.

I find it strange ..when its said that struts are for JSP 2.0 and sevlets 2.4 , why wont it work with a DD using DTD 2.4 ?

edit: I am using struts lib and tld ver 1.2.7.
[ August 02, 2005: Message edited by: Saiyed Zaidi ]

SCJP 1.2, SCWCD 1.4.<br />What goes around comes around ... with ver 1.1
Dave Salter
Ranch Hand

Joined: Jul 20, 2005
Posts: 292

It should work fine. I use 2.4 and struts 1.2.7

What does your struts-config.xml look like?
Manzar Zaidi
Ranch Hand

Joined: Oct 21, 2004
Posts: 43
I used the struts-config.xml that comes in the blank.war along with the download.

The issue isnt with it as I can run the app without making any changes to it.

I am using the 2.4 servlet jar, it runs with the 2.4 jar, but not with a WEB XML conforming to DTD 2.4.

If I change the web-xml to conform to DTD 2.4 ( and remove the taglib elements, as required ) I get errors.
If I use the default web-xml (DTD 2.2 ) it works fine.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I got a similar message when moving from a 2.2 container to a 2.3 web container. In my case, the problem was with the following lines:


Apparently the 2.2 container would tolerate WEB-INF/struts-config.xml, but the 2.3 container needed /WEB-INF/struts-config.xml. This may not be the same problem you're encountering, but it's worth mentioning.


Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: struts dont work with web xml DTD 2.4?
 
Similar Threads
Deployment Descriptor 2.4 ?
Servlet 2.4 Web.xml (DD) - Urgent help required
EL not getting translated in JSP page
*listener* *listener-class*
HttpSessionListener