File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes javax.servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "javax.servlet" Watch "javax.servlet" New topic


John Davis
Ranch Hand

Joined: Nov 02, 2000
Posts: 189
I have
import javax.servlet.*;
import javax.servlet.http.*;
in my servlet but get the message
package javax.servlet does not exist and
package javax.servlet.http does not exist
My SDK situation is j2sdk1.4.1 and I also installed j2see1.4 and included the j2ee.jar in the path. I thought that javax.servlet.http was included in here somewhere.
Am I missing a download? I've been all over SUN looking for javax.servlet but haven't found any download that might have these packages.
Anybody can help with this?
Brusk Baran
Ranch Hand

Joined: Nov 15, 2001
Posts: 132
put these JARs also in

I dont know why. since they also existed on the classpath but it had not worked in my case before.
I heard from someone, that servlet-container does not "see" the system classpath, but not sure about it...
Amol Desai
Ranch Hand

Joined: Jan 29, 2003
Posts: 82
To compile the servlet classes,you need to set j2ee.jar in the classpath and not in the path.
Oherwise you could also place them
<java-home>\jre\lib\ext\ directory.
I agree. Here's the link:
subject: javax.servlet
It's not a secret anymore!