• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DTD problem in Struts-config.xml

 
vishnu vardhana reddy vaka
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

i deployed the web application with struts 1.2 DTD declaration in struts-config.xml , that some times giving exception input/output error while parsing the struts-config.xml and then its showing servlet inactive message when i try to access the application from browser .

some times its deploying fine.. for deploying successfully , i removed the DTD delcaration completely. now the applciation is deploying and running fine. but itz throwing some execptions at server console like <strus-config> no grammer found etc..

i do not understand this behaviour.can some one please suggest me how to go about this .

i am using tomcat 5.0.30

Thanks in advance.
Regards
vishnu
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Vishnu,

Did you have the struts-1.2.x jar in the "lib" folder of either your web application (TOMCAT_HOME/webapps/YOURAPP/WEB-INF/lib) or the shared lib folder of Tomcat (TOMCAT_HOME/shared/lib)?

Just check that. It would be better if you could paste the error message what you get so as to help the people in giving a perfect solution.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To elaborate on what Raghavan said, the important thing is that the jar files in your WEB-INF/lib directory match the DTD. If you have Struts 1.2.x jar files, you must have a Struts 1.2 DTD. If you have Struts 1.3.x jar files, you must have a Struts 1.3 DTD.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, why you need a .jar file? Since it contains the respectice DTD file.

Why you want the DTD file to be present? because its presence helps the container (JSP engine) to validate the xml tags compliant to that of struts-config DTD so as to ensure you are up to the expectation of Struts framework.

Does that help a little more?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic