users@glassfish.java.net

RE: anything special needed for GlassFish to work with Java Servlet?

From: Narayana Rallabandi <narayana.rallabandi_at_oracle.com>
Date: Wed, 16 May 2012 10:48:01 -0700 (PDT)

I guess you are trying to compile your class. In that case you don't need to do anything with GF. All you need is your library in the CP for compiling your Servlet.


-----Original Message-----
From: modjklist_at_comcast.net [mailto:modjklist_at_comcast.net]
Sent: Wednesday, May 16, 2012 11:15 PM
To: users_at_glassfish.java.net
Subject: anything special needed for GlassFish to work with Java Servlet?

Hi, I've got a web application using Java SE 1.6 and GlassFish 3.1.2. Using regular Java POJOs, everything is working fine. I have JAVA_PATH, JAVA_HOME and JRE_HOME set correctly for jdk1.6.

Now I want to use a Java Servlet. Do I need to do anything special to setup GlassFish to work with Java servlets?

Currently I'm getting errors such as:

package javax.servlet.http does not exist

Is this error something I should solve by a GlassFish setting somewhere? Or, do I just need to figure out where the servlet files are located on my linux server then include them in the compile path when creating the class (that is, removing this error has nothing to do with GlassFish)?