Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Web Application Migration from Tomcat 4.1 to Tomcat 6.0  RSS feed

 
madhuri ponasanapalli
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,

I am having trouble migrating by web application from Tomcat 4.1 to Tomcat 6.0 . This application uses struts 1.3.8.

When I deploy the application in Tomcat 6.0 , I get the below error.



If I include the servlet.jar from Tomcat 4.1 in the WEB-INF/lib the application works fine .
Except for the warning validateJarFile(C:\Apache\Tomcat 6.0\webapps\MyApplication\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class.

This happens on pages that use the Tiles Layout.

I dont want to use the servlet.jar from Tomcat 4.1 . I want to use the servlet-api.jar & jsp-api.jar from Tomcat 6.0 .

Can anyone please advise .
Thanks
Madhuri

 
Tim Holloway
Bartender
Posts: 18709
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Were you attempting to include the Tomcat 6 servlet jar in your webapp?

You shouldn't ever include servlet.jar. If you do, you may experience classpath errors, since the TOMCAT_HOME/lib servlet.jar is in the server's system classpath.

I guess the split between servet-api.jar and servlet-impl.jar must have occurred between Tomcat 4 and Tomcat 5. It's been long enough I don't remember. Web applications should be compiled with the servlet-api.jar in their compile classpath, though the actual jar itself should not be included in the WAR file, since the server's copy will be used at runtime.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!