Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes javax.servlet in servlet.jar? 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 "javax.servlet in servlet.jar?" Watch "javax.servlet in servlet.jar?" New topic

javax.servlet in servlet.jar?


Joined: Jul 22, 2001
Posts: 8
I am trying to get a servlet to compile and have the classpath pointed to /var/tomcat/lib/servlet.jar, but I keep getting the error javax.servlet does not exist and javax.servlet.http does not exist! I used export CLASSPATH=/var/...... and classpath shows up when I echo it. Is CLASSPATH the right environmental variable for jdk1.3.0_02?
Sam Dalton
Ranch Hand

Joined: Jul 26, 2001
Posts: 170
This is definitely the correct file to have in your classpath. servlet.jar definitely contains the javax.servlet.* and javax.servlet.http.* packages. I suggest it is a problem with how you have exorted your classpath. Try creating a shell script, the does the classpath setting, and also the compilation

<a href="" target="_blank" rel="nofollow">Sam Dalton</a>,<br />Co-author of []Professional JSP 2.0[/URL] (October 2003)<br />Co-author of <a href="" target="_blank" rel="nofollow">Professional SCWCD Certification</a><br />Co-author of <a href="" target="_blank" rel="nofollow">Professional Java Servlets 2.3</a>

Joined: Jul 22, 2001
Posts: 8
The problem was a permissions issue, my permissions were set wrong because the default when creating folders in Linux/UNIX is no entry.
It is sorta covered in the JavaRanch Style Guide.
subject: javax.servlet in servlet.jar?
Similar Threads
Servlet compile problem
Just a query!
Unable to complie
servlet.jar and j2ee.jar