Or you could use a nice IDE like NetBeans with GlassFish integrated :-)
and have fun developing Servlets and other Java EE component technologies.
Here's a nice set of YouTube videos by Arun Gupta, our community
Evangelist, on this topic that might help you very much. Although the
video uses NetBean 6.9, the examples should all work with the latest
versions of NetBeans and GlassFish 3.1.2
http://www.youtube.com/watch?v=pwBNmAhtqk8
Hope this is helpful you.
Shreedhar
On 5/16/12 10:48 AM, Narayana Rallabandi wrote:
> 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)?