• Post Reply Bookmark Topic Watch Topic
  • New Topic

Just a query!  RSS feed

 
Sumit Israni
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey All,
I recently downloaded JDK 1.3 but to my surprise there was no
javax.servlet package (even the http one).So my question is if I have to write and compile a servlet how do I access the package available in jsdk2.0 (which I have installed).I'd like to add that there is another problem which I am facing .It is :How do I write the import statement required at the beginning of the source file .The problem I face is that it does not recognize a statement such as
import jsdk2.0.src.javax.servlet.*;
This is because of the version and the dot in between .
How do I work this out and have access to the package?
Please help me on this front .(To be frank I am very impressed by this community! ).Hope to receive your reply in real time!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The servlet stuff is part of the J2EE package but not SDK as you observed.
You should NOT use the jsdk2.0 package - it is years out of date. Sun transferred all servlet and JSP development to the Apache organization almost 2 years ago. Remove all traces of jsdk 2.0 and then get the Tomcat package from jakarta.apache.org
The Tomcat 3.2 package is stable but if you want to work with the absolute latest API, which includes neat stuff like filters, get the 4.0
Sun has Tomcat links plastered all over the java.sun.com site - I don't know why people keep finding the jsdk....
Bill
------------------
author of:
 
Sumit Israni
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey William,
I take your advice,but what about the latter half of my problem!!.What do I do if I am faced with similar instances (the import statement in particular)..?
If you can answer that I'll be grateful.
Thanks
 
Ronald Francis
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Include servlet.jar in your classpath, and use
import javax.servlet.*;
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!