This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes package javax.servlet does not exist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "package javax.servlet does not exist" Watch "package javax.servlet does not exist" New topic

package javax.servlet does not exist

Jojit Estillore

Joined: Aug 12, 2003
Posts: 3
set classpath=c:\jdk1.3.1_06\;
set Java_Home=c:\jdk1.3.1_06\
set Tomcat_Home=c:\Jakarta-tomcat-3.2.3
cd jakarta-tomcat-3.2.3
cd bin
When i compile my code it give me this error "package javax.servlet does not exist"
is there something wrong or any modifications to be made in autoexec.bat?
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 641
Try this,
set classpath=c:\jdk1.3.1_06\;.;c:\Jakarta-tomcat-3.2.3\lib\servlet.jar;
[ October 19, 2003: Message edited by: Praful Thakare ]

All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Kapil Varshney

Joined: Oct 19, 2003
Posts: 1
U need to include servlet.jar
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Yes, you can include servlet.jar on your classpath like Praful Thakare
says. Adding 'j2ee.jar' to the classpath would also work.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: package javax.servlet does not exist
It's not a secret anymore!