This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes setting classpath for servlet-api.jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "setting classpath for servlet-api.jar" Watch "setting classpath for servlet-api.jar" New topic
Author

setting classpath for servlet-api.jar

Kondapally Ashwin
Greenhorn

Joined: May 16, 2006
Posts: 25
Hi,

Please advise how I can set the classpath for servlet-api.jar.

I tried out setting the classpath in environment variables and also tried out setting the classpath in command prompt by entering the command set CLASSPATH = .;C:\Tomcat5.5\common\lib\servlet-api.jar. But I am still getting the same errors -cannot find symbol...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

Are you talking about during compilation or execution?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Kondapally Ashwin
Greenhorn

Joined: May 16, 2006
Posts: 25
I was able to compile the file by using the command javac -classpath C:\Tomcat5.5\lib\servlet-api.jar HelloServlet.java.

But I couldn't compile after separately setting the classpath in environment variables as well as setting classpath in command.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setting classpath for servlet-api.jar
 
Similar Threads
Software requirements??
Servlet Compilation Error
cannot find symbol : class HttpServletResquest
Servlet Compilation Error
struts with tomcat -not recognizing servlet.api.jar