This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Tomcat and the fly likes javax.servlet not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "javax.servlet not found" Watch "javax.servlet not found" New topic
Author

javax.servlet not found

Karen Zeller
Greenhorn

Joined: Jan 21, 2010
Posts: 14
Hi,

Going through the tutorials and this error seems to have happened to people in the past. I'm trying to compile my first servlet and I get the javax.servlet does not exist error.

I've tried updating my PATH to point to tomcat/lib/jsp-api.jar as well as tomcat/lib/servlet-api.jar.

Short of installing Eclipse is that resource out there somewhere on Tomcat 6?


Thanks

Karen

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61087
    
  66

PATH has nothing whatsoever to do with it. You need to add the jar to the compilation classpath.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Karen Zeller
Greenhorn

Joined: Jan 21, 2010
Posts: 14
I just created CLASSPATH and added the two paths to it. Now it compiles.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.servlet not found