Skip to main content

servlet-api.jar - jar not loaded error

problem with Tomcat 6.x
---------------------------------------
INFO: validateJarFile(E:\Program Files\Apache Software Foundation\apache-tomcat-6.0.33\webapps\nbmdsTom\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

If you got the following error message for all jsp's and servlet's in your web application with the above INFO on server screen

org.apache.jasper.JasperException: java.lang.NullPointerException
java.lang.NullPointerException
org.apache.jsp.index_jsp._jspInit(index_jsp.java:22)



Answer
----------------------------------------
Just Remove the servlet-api.jar and jsp-api.jar files from WEB-INF\lib folder.


Reason
----------------------------------------
Those jar files was already there in Tomcat 6.x\lib folder.
so, Tomcat run-time environment gets confused with javax/servlet/Servlet.class from 2 jar files.

Comments

Popular posts from this blog

When to Use a Factory Pattern

When to Use a Factory Pattern You should consider using a Factory pattern when · A class can’t anticipate which kind of class of objects it must create. · A class uses its subclasses to specify which objects it creates. · You want to localize the knowledge of which class gets created. There are several similar variations on the factory pattern to recognize. 1. The base class is abstract and the pattern must return a complete working class. 2. The base class contains default methods and is only subclassed for cases where the default methods are insufficient. 3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share the same method names but may do something quite different.

How IP Telephony Works

How IP Telephony Works If you regularly make long-distance phone calls, chances are you've already used IP telephony without even knowing it. IP telephony, known in the industry as Voice-over IP (VoIP), is the transmission of telephone calls over a data network like one of the many networks that make up the Internet. While you probably have heard of VoIP, what you may not know is that many traditional telephone companies are already using it in the connections between their regional offices. This person is using a computer to talk to a friend in another state. In this article, you'll learn about VoIP and the technology that makes it possible. We'll talk about VoIP's major protocols, about the various services provided and the low-cost, often free software that allows you to take advantage of them. But first, let's discuss the fundamental problem with existing telephone networks -- namely, their reliance on circuit switching. Circuit Switching Circuit switchin...