javax.servlet.* and javax.servlet.http.* don't exist?

When I compile a class that hase the following import statements:import javax.servlet.*;import javax.servlet.http.*;the compiler says that those packages don't exist, but I'm pretty sure that the do.Does anybody knows what I could do wrong?Nico
[295 byte] By [JavaSpiky] at [2007-9-26 22:13:20]
# 1

hi spike,

well do this,

dont forget to include classpath to your jsdk.jar file.

this is the problem due to which you are not able to compile.

i give u a typical example of compilation

javac -classpath .;c:\j2sdk\lib\jsdk.jar

hope this helps

bye

goldy

MrGoldy at 2007-7-4 1:39:00 > top of Java-index,Developer Tools,Java Compiler...
# 2
I have similar problems, but I've j2sdk1.4, and there IS no j2sdk*.jar in the lib directory, only jars in the directory are:dt.jartools.jarhtmlconverter.jarwasup with that?Thanks for helping out a noob
Campernator at 2007-7-4 1:39:00 > top of Java-index,Developer Tools,Java Compiler...
# 3
Download J2EE. The servlet classes will be in the j2ee.jar.
cknelsen at 2007-7-4 1:39:00 > top of Java-index,Developer Tools,Java Compiler...
# 4

I am a beginner of JAVA. I have problem during the program compile. I am using WinXP and already install "j2sdk1.4.1" and "j2sdkee1.3.1". I have also set the path "SET C:\j2sdk1.4.1\bin; C:\j2sdkee1.3.1\lib;". Then try to compile a similar servlet program.

import java.io.*;

import javax.servlet.*;

import javax.servlet.http.*;

public class HW extends HttpServlet {}

When I tried to compile it "javac HW.java", it prompted

"HW.java2: package javax.servlet does not exist"

"HW.java3: package javax.servlet.http does not exit"

Please! could any expert help a new babe? Seems can't recognize location of package.

soncat at 2007-7-4 1:39:00 > top of Java-index,Developer Tools,Java Compiler...
# 5
I fixed the problem. It works to set the class path in environment variablesJAVA_HOME = C:\j2sdk1.4.1J2EE_HOME = C:\j2sdkee1.3.1PATH = %JAVA_HOME%\bin;%J2EE_HOME%\bin;%J2EE_HOME%\lib\j2ee.jar
soncat at 2007-7-4 1:39:00 > top of Java-index,Developer Tools,Java Compiler...
# 6
1. Get j2sdkee1.3.1, Enterprise Edition.2. Add classpath to j2ee.jar like j2sdkee1.3.1\lib\j2ee.jar.It will work!
ddolsooni at 2007-7-4 1:39:00 > top of Java-index,Developer Tools,Java Compiler...