This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Compilation problem in servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Compilation problem in servlets" Watch "Compilation problem in servlets" New topic
Author

Compilation problem in servlets

Ashish Vijay Joshi
Greenhorn

Joined: Nov 27, 2006
Posts: 10
Hello,
I am using tomcat5.5,jdk1.5.0_07 and sun application server 8. I have set the classpath as PATH environment variable as:

C:\Program Files\Java\jdk1.5.0_07\bin;
C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar;
C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\jsp-api.jar;
C:\ProgramFiles\Java\jdk1.5.0_07lib\tools.jar;C:\Sun\AppServer\lib\j2ee.jar;
Now from some folder in say D: drive i am trying to compile a program which is a servlet. But its giving error:
import javax.servlet;import javax.servlet.*; does not exist.
Unable to recognise the symbol HttpServletRequest;

Please give solution.
Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502

PATH is for different purpose. set CLASSPATH environment variable pointing to

C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar;
C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\jsp-api.jar;


Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />prabhu.venkatachalam@gmail.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compilation problem in servlets
 
Similar Threads
Error compiling my first servlet
What is the classpath for Tomcat 5.5?
package javax.servlet does not exist
What is the classpath for Tomcat 5.5?
please help! classpath not working