[Tomcat] validateJarFile(servlet-api.jar) - jar not loaded. Offending class: javax/servlet/Servlet.class org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class.
I googled for this,I got to know that I am using servlet-api.jar in my project WEB-INF/lib, and also I am having same servlet-api.jar in tomcat/lib folder. so I have to remove servlet-api.jar, But if I remove that jar, I am getting error in import javax.servlet.*; so how to I solve this, help me for fix this error.Thanks in advance
The error you are getting is because servlet-api needs to be on compile time build path, at runtime your app will have the servlet-api available from tomcat/lib
So add it to your build path simply, In short servlet-api
is required at compile aswell as runtime
Try this to remove the warning message you were getting.
servlet.jar
in your webapps lib
directory.C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\YOUR_project\WEB-INF\lib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With