| Author |
beginner qyestion, servlet install on J2sdk1.4.2 or not?
|
may Lee
Ranch Hand
Joined: Nov 20, 2003
Posts: 68
|
|
|
Does J2sdk1.4.2-30 support servlet? Or I have to download JWSDK? I complie a servlet, the error is pacakge javax.servlet not exist. WHy I heard that the J2sdk already include servelt?
|
 |
Carl Trusiak
Sheriff
Joined: Jun 13, 2000
Posts: 3340
|
|
|
J2SE does not include any of the the J2EE packages. Servlet, JSP, JavaMail etc. You need to get those from a seperate source. You could download each package seperately or download JWSDP. Also, if you download a server such as Tomcat, you get those packages with it usually in the shared lib.
|
I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
|
 |
may Lee
Ranch Hand
Joined: Nov 20, 2003
Posts: 68
|
|
I have installed Tomcat 4.1.30, and I can see its servlet exampel at localhost:8080, after I add the webapp model, I can see the servlet example at localhost/examples, Except Naming example is not working, other can run. but what shall I do to compile my servelt code? add Tomcat 's class path? I didn't find anything under tomcat's shared folder. Lib and class are empty. Please advise me ! thanks a lot!
|
 |
Jon Entwistle
Ranch Hand
Joined: Feb 20, 2003
Posts: 118
|
|
You need to add the position of servlet.jar to the classpath. It will probably be somewhere like $CATALINA_HOME/lib for *nix, and probably c:\tomcat4.1\lib\servlet.jar or similar on windows (version/install directory may change). Cheers, Jon
|
SCJD, SCEA
|
 |
may Lee
Ranch Hand
Joined: Nov 20, 2003
Posts: 68
|
|
|
thansk, I found it, it is in CATALINA_HOME/common/lib, servlet.jar
|
 |
Jon Entwistle
Ranch Hand
Joined: Feb 20, 2003
Posts: 118
|
|
Your are right - sorry!
|
 |
may Lee
Ranch Hand
Joined: Nov 20, 2003
Posts: 68
|
|
No need sorry, it is because of your answer that I serach "servlet.jar" under CATALINA_HOME, otherwise, I only thought to include the CATALINIA_HOME/bin is enough. Thanks
|
 |
 |
|
|
subject: beginner qyestion, servlet install on J2sdk1.4.2 or not?
|
|
|