• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package javax.servlet does not exist

 
Peter Primrose
Ranch Hand
Posts: 755
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I'm using eclipse and after writing a simple servlet, that works just fine, I decided to use ANT. Anyway, when running ANT I get this message:



I googelized the topic and learned that the classpath is the issue because it doesnt have the servlet.jar/ servlet-api.jar --- I placed them both on the classpath (under enviroment variable)....nothing! same error message by ANT! anyone?
[ August 06, 2006: Message edited by: Bear Bibeault ]
 
Naseem Khan
Ranch Hand
Posts: 809
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May be your system claspath environment is not set correctly.

In Environment variables > System variables > NEW

New System Variable

Variable Name: CLASSPATH
Variable Value: ABSOLUTE PATH OF servlet-api.jar (don't put semicolon in the end)

For example, suppose your servet-api.jar is in c:\Tomcat 5.5\common\lib then your variable value will be c:\Tomcat 5.5\common\lib\servlet-api.jar


Hope this will help


Naseem
[ August 06, 2006: Message edited by: Naseem Khan ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Ant javac task makes it easy to add items to your classpath wihtou having to copy them around your file system. That's a really bad idea as you can quickly lose control when upgrading to higher versions of the container.

In any case, as this is an Ant issue, moved to the Ant forum.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic