it gave me the error-> package javax.servlet does not exist
Im using j2sdk1.4.0 Tomcat4.1 CLASSPATH=C:\Tomcat4.1\common\lib\servlet.jar Whats wrong with this.. I went through the web befor submit this,there were plenty of occurences of the same problem but the answers were same as "Check your classpath" for most of the times.
Pls help me on this. Thanx in advance for any help. best regs, Jayanath.
I went through the web befor submit this,there were plenty of occurences of the same problem but the answers were same as "Check your classpath" for most of the times.
The answers you found were correct. It is a classpath problem. Since your classpath points to servlet.jar (which contains said package) I'd check whether you are actually using the classpath when you compile this class - it could be being overwritten if you are using an ant file for example, or ignored by whatever IDE you have. An of course, I'd check servlet.jar hasn't been corrupted.
Pathak, Im using the command prompt and when I type echo %classpath% it displayed the servlet.jar file in the path. My OS is WinXP & Ive used environment variable setting to add the servlet.jar file into the classpath. But problem is still there.
Paul,How do I verify whether my servlet.jar file is corrupted or not.Pls let me know.
It is very unlikely that your servlet.jar is corrupted - I would first check very carefully the spelling and syntax of your classpath variable and ensure it matches the same position on file. Better still post the entire classpath here.
As far as checking out the servlet jar, the syntax is similar to tar:
from the command line in the directory holding the file: