Nalini Gupta wrote:Add servlet-api.jar to the classpath.
You need to be more specific and less misleading. The filename namely differs per application server implementation. The servlet-api.jar only applies to Apache
Tomcat (or clones). It also differs per application server implementation if you just need one or more JAR files.
More correct answer is: "You need to add the JSP/Servlet API classes of the application server implementation to the classpath.".