newbie servlet help

S

sparrow

Hi

I cant compile my servlets, I think I have somthing missing ( :) ),
I'm geting this error when I try to compile a servlet (command line
javac HelloWorld.java is this right ?)

C:\Program Files\lws-3.0.3\webapps\hall\HelloWorld.java:4: package
javax.servlet does not exist
import javax.servlet.*;

however compiling a test class (none servelet) gives me this error

C:\j2sdk1.4.2_04\java\net\URI.java:2572: warning: as of release 1.4,
assert is a keyword, and may not be used as an identifier
assert false;

can anyone help ?
Thanks
Simon
 
N

Nigel Wade

Hi

I cant compile my servlets, I think I have somthing missing ( :) ),
I'm geting this error when I try to compile a servlet (command line
javac HelloWorld.java is this right ?)

C:\Program Files\lws-3.0.3\webapps\hall\HelloWorld.java:4: package
javax.servlet does not exist
import javax.servlet.*;

javax.servlet is not part of the standard SDK. It is normally supplied in
a separate jar file (servlet.jar) with the servlet container. You need to
locate where this has been installed on your system and specify
that location as part of the classpath for javac and java.
however compiling a test class (none servelet) gives me this error

C:\j2sdk1.4.2_04\java\net\URI.java:2572: warning: as of release 1.4,
assert is a keyword, and may not be used as an identifier
assert false;

Try adding '-source 1.4' to the javac command.
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top