This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Where to find javax.servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Where to find javax.servlet?" Watch "Where to find javax.servlet?" New topic

Where to find javax.servlet?

Hamwira, Yaacob

Joined: May 23, 2001
Posts: 5
Where can we find javax.servlet.* in JDK1.1.7?
Wendy Cheong

Joined: Jun 12, 2001
Posts: 7
You cannot find javax.* in jdk because javax => java extension so you cannot find it in JDK. If you want to javax classes look for JSDK or if you're using Java2,ie, JDK1.2 and above, look for JSDKEE. Please note that jsdkee cannot be used with Java1, ie, jdk1.1.* .
You can download your jdk's and jsdk's from here :
Hope this helps

------------------------<br />Cheerios,<p>Wendy
Hamwira, Yaacob

Joined: May 23, 2001
Posts: 5
Thank you so much for the information...
I do get something out of your answer but I still have some curiousity...
Let me put it this way,
I am using JDK1.1.7..
Can I just copy javax package from the latter java version and put include it with my JDK1.1.7??

Let me know..
Samith Nambiar
Ranch Hand

Joined: Mar 14, 2001
Posts: 147
what exactly do u mean by

Can I just copy javax package from the latter java version and put include it with my JDK1.1.7??

as Wendy rightly said the javax packages do not come along with the JDK .... now if u do have the servlet.jar file and if your purpose is to avoiding the setting of the classpath you must out it into
JAVA_HOME/jre/lib/ext folder
hope that helps
Kristy McClure

Joined: Jun 19, 2001
Posts: 13
If you're running Tomcat, you already have the servlet.jar file you need. You only need to point your classpath to it.
One caveat: I just found (after hours of teeth-gnashing) that at least on NT, you can't use environment variables as tokens in other variables and have Java be able to follow it. Example:
- let's say you have TOMCAT_HOME set to 'd:\jakarta-tomcat-3.2.2'
- don't put '%TOMCAT_HOME%\lib\servlet.jar' in your CLASSPATH and expect it to work when compiling Java source that needs that .jar file. You instead have to put 'd:\jakarta-tomcat-3.2.2\lib\servlet.jar' in your classpath.
When I did this, compilation errors arising from javac not finding javax.servlet.* stopped.

pardon me, but you've obviously mistaken me for someone who gives a damn...
I agree. Here's the link:
subject: Where to find javax.servlet?
Similar Threads
How to compile a servlet using javac.exe?
HFSJ page 81
how to cross over "javax.servlet.* not found " problem?
source code of javax.servlet.http.* pacakage
Where to put the servlet.jar