*
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 Android Security Essentials Live Lessons this week in the Android 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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Compilation problem in servlets
 
Similar Threads
please help! classpath not working
package javax.servlet does not exist
What is the classpath for Tomcat 5.5?
Error compiling my first servlet
What is the classpath for Tomcat 5.5?