Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

where is the servlet-api.jar in glassfish installation?

Tags:

jar

glassfish

We are migrating our project from the Sun App server to Glassfish. For compilation we need the classpath to be set to the servlet-api.jar which is found in the servlet container. Where in the Glassfish installation can I find these jars?

Thanks.

like image 829
user1226058 Avatar asked Jul 10 '13 14:07

user1226058


People also ask

Where can I find javax servlet?

It contains, among others, the files /usr/share/java/servlet-api-2.5. jar and /usr/share/java/jsp-api-2.1. jar , which are the servlet and JSP libraries you need.

Where do I put Servlet API in eclipse?

For adding a jar file, right click on your project -> Build Path -> Configure Build Path -> click on Libraries tab in Java Build Path -> click on Add External JARs button -> select the servlet-api. jar file under tomcat/lib -> ok. Now servlet has been created, Let's write the first servlet code.

Does GlassFish support Servlet?

GlassFish Server supports the Java Servlet Specification version 3.0. Note - Servlet API version 3.0 is fully backward compatible with versions 2.3, 2.4, and 2.5, so all existing servlets should work without modification or recompilation.

What is the use of Servlet API jar?

What is it? The servlet-api jar is a library which contains the interfaces and classes of the Servlet API specification. The servlet-api jar contains only the interface (the API) of the Servlet Specification, so you can use it to develop your web application.


1 Answers

I guess you want to use Glassfish 3 or higher.

You can find the servlet-api in

$GLASSFISH_HOME\glassfish\modules\javax.servlet-api.jar

in Glassfish 3 and 4.

like image 186
unwichtich Avatar answered Oct 13 '22 19:10

unwichtich