Hi all,
I've been using Tomcat at various releases for a few years, mostly at dev
level, nothing in production.
But recently I downloaded Tomcat 6.0.18 and tried to deploy a web service to
it, and I get a strange warning come up at the Tomcat output console.

...
Dec 18, 2008 1:32:01 PM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO: validateJarFile(C:\apache-tomcat-6.0.18\webapps\
PersonWebService-1.0\WEB-INF\lib\servlet-api-2.5.jar) - jar not loaded. See
Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
 ...

My web service was created using Maven2. Maven insists on helping as much as
possible and wants to include the "servlet-api-2.5.jar" in the /WEB-INF/lib
folder. That's fine, I added the Maven dependency to my pom.xml and Maven is
now happy. As expected, the war file produced has the "servlet-api-2.5.jar"
file in the lib folder.

But when I drop that war file into the <Tomcat_install>/webapps folder of
Tomcat, during deployment the above error is thrown out.

I searched the web and many sites and blogs recommend simply removing the
servlet-api-2.5.jar file from the war file and indeed, that stops the
warning. But it seems to me that Maven is correct here in leaving it in the
war, while Tomcat should realize that many deployed war files may include
this common jar?

Any info or help would be much appreciated.
Thanks,
-jeff walker

Reply via email to