• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

struts with tomcat -not recognizing servlet.api.jar  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Set Servlet-api.jar in ur classpath
 
aditya chowdary
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!