• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

struts with tomcat -not recognizing servlet.api.jar

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Set Servlet-api.jar in ur classpath
 
aditya chowdary
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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........
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
>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.
 
Hold that thought. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic