File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Soft Skills this week in the Jobs Discussion 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