Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

beginner qyestion, servlet install on J2sdk1.4.2 or not?

 
may Lee
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3340
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
may Lee
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 118
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
may Lee
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thansk, I found it, it is in CATALINA_HOME/common/lib, servlet.jar
 
Jon Entwistle
Ranch Hand
Posts: 118
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your are right - sorry!
 
may Lee
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic