Cause of the problem:
Application packaging was deployed to the Tomcat server, the applications failed to start, and Tomcat reported an exception:
2012-9-21 15:09:46 Org.apache.catalina.loader.WebappClassLoader Validatejarfile
Info: Validatejarfile (/home/xx/xx/portal/web-inf/lib/servlet-api.jar)-jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending Class:javax/servlet/servlet.class
Problem Analysis:
Tomcat exception indicates that a jar package is illegal and this jar package fails to load, so it should be that the jar package failed to load and the application failed to start
Look under, find the application Web-inf/lib directory exists Servlet-api.jar, while the Common/lib directory of Tomcat also exists Servlet-api.jar (using tomcat-5.5.23)
When Tomcat starts, it reads all of the jar packages in the Tomcat/common/lib directory into memory, and if the application Web-inf/lib directory has the same jar package, it will fail to load, and it may also cause similar problems between different versions of JAR packages.
How to resolve:
Remove Servlet-api.jar from the Web-inf/lib directory in the application, recompile the packaged deployment, the application starts successfully and Tomcat does not report an exception
Therefore, it is recommended to try not to put the jar package into the Tomcat/common/lib directory, in order to avoid and the application in the Web-inf/lib directory of the jar package duplication caused the jar package load failure