linux servlet problem

A

anontera

I'm trying to compile a servlet on a rh 9 box ... i have Java SDK 1.4.2
installed under /usr/java/ and $JAVA_HOME correctly set ... i have
downloaded the J2EE 1.3.1 SDK and set $J2EE_HOME ... however, how do
compile a servlet ... i'm still getting the

HelloWorldExample.java:8: package javax.servlet does not exist
import javax.servlet.*;
^
HelloWorldExample.java:9: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
HelloWorldExample.java:17: cannot resolve symbol
symbol : class HttpServlet
location: class HelloWorldExample
public class HelloWorldExample extends HttpServlet {
^
HelloWorldExample.java:20: cannot resolve symbol
symbol : class HttpServletRequest
location: class HelloWorldExample
public void doGet(HttpServletRequest request,
^
HelloWorldExample.java:21: cannot resolve symbol
symbol : class HttpServletResponse
location: class HelloWorldExample
HttpServletResponse response)
^
HelloWorldExample.java:22: cannot resolve symbol
symbol : class ServletException
location: class HelloWorldExample
throws IOException, ServletException
^
6 errors

What do i have to set to correct the error?

thanks in advance
 
T

Taki

I think you have to add .jar files in $J2EE_HOME/lib as classpaths
when you compile the program.

Hope this helps

Taki
 
M

Mladen Adamovic

I asked it 3 days ago :).

Hope it helps as it helped me, and thanks to Chris Smith.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top