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 with tomcat -not recognizing servlet.api.jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts with tomcat -not recognizing servlet.api.jar" Watch "struts with tomcat -not recognizing servlet.api.jar" New topic
Author

struts with tomcat -not recognizing servlet.api.jar

aditya chowdary
Greenhorn

Joined: Aug 02, 2005
Posts: 2
Hi evereyBody,
I am trying to run struts application in tomcat5.0.19.I am getting the fallowing exception while running tomcat.Please give me solution regd this.
i have tested with the tomcat servlet-api.jar(5.0).

INFO: Installing web application at context path /exercise04 from URL file:C:\jakarta-tomcat-5.0.19\webapps\Myapp
Aug 2, 2005 7:08:09 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\jakarta-tomcat-5.0.19\webapps\Myapp\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Aug 2, 2005 7:08:09 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Aug 2, 2005 7:08:09 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Aug 2, 2005 7:08:09 PM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Thnx...
Pavan Tummala
Ranch Hand

Joined: Dec 25, 2004
Posts: 74
Set Servlet-api.jar in ur classpath


If Java had true garbage collection, most programs would delete themselves upon execution -- Robert Sewell
aditya chowdary
Greenhorn

Joined: Aug 02, 2005
Posts: 2
Hi sorry again,

I have set the classpath also.the classpath is like

C:\jakarta-tomcat-5.0.19\common\lib\servlet-api.jar;
C:\jakarta-tomcat-5.0.19\common\lib\jsp-api.jar;
C:\jakarta-tomcat-5.0.19\common\lib\struts.jar;
C:\jakarta-tomcat-5.0.19\common\lib\commons-validator;.;

I guess the problem is mismatch of servlet.jar file versions.i took latest jar file (from tomcat5.0)but still........
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1018
>INFO: validateJarFile
>C:\jakarta-tomcat-5.0.19\webapps\Myapp\WEB-INF\lib\servlet-api.jar

You shouldn't have servlet-api.jar in your web-inf/lib directory.

Also note that Tomcat does not use the classpath environment variable.
The classpath (as far as Tomcat is concerned is)
Class folder: web-inf/classes
Jar files in: web-inf/lib, [TOMCAT]/shared/lib, [TOMCAT]/common/lib

If a jar file appears more than once in these various directories it can create a problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts with tomcat -not recognizing servlet.api.jar