wood burning stoves 2.0*
The moose likes Servlets and the fly likes 'javax.servlet . * package does not exist !' 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 » Servlets
Bookmark " Watch " New topic
Author

'javax.servlet . * package does not exist !'

Ghazala Islam
Ranch Hand

Joined: Nov 22, 2000
Posts: 73
I have following lines in my autoexec.bat file.
rem java
path=%path%;c:\jdk1.3\bin
set JAVA_HOME=c:\jdk1.3
set CLASSPATH=.;
rem tomcat
path=%path%;c:\tomcat\bin
set TOMCAT_HOME=c:\tomcat
set CLASSPATH=%CLASSPATH%c:\tomcat\lib\servlet.jar
set CLASSPATH=%CLASSPATH%c:\tomcat\lib\jasper.jar
set CLASSPATH=%CLASSPATH%c:\java
I've saved and compile my servlet in tomcat/webapps/
examples/web-inf/classes direectory.When I compile
the servlet it gives error on first line where
'import javax servlet.*' is written that
'Package javax.servlet.*' does not exist'.
What to do now or where I'm doing wrong?
are there any modifications to be made in autoexec.bat
file and web.xml?

Please advise.

Prasad Charasala
Ranch Hand

Joined: Nov 02, 2000
Posts: 67
Hi Ghazala,
The problem might be because, there is no semicolon after
%CLASSPATH% in every line.
it should be like this
set TOMCAT_HOME=c:\tomcat
set CLASSPATH=%CLASSPATH%;c:\tomcat\lib\servlet.jar
set CLASSPATH=%CLASSPATH%;c:\tomcat\lib\jasper.jar
set CLASSPATH=%CLASSPATH%;c:\java
or like this
set TOMCAT_HOME=c:\tomcat
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\servlet.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\jasper.jar
set CLASSPATH=%CLASSPATH%c:\java


------------------
Prasad


<B>Prasad</B>
Monty Ireland
Ranch Hand

Joined: Oct 03, 2000
Posts: 161
My system settings:
JAVA_HOME=d:\jdk1.3
TOMCAT_HOME=d:\tomcat
CLASSPATH=%JAVA_HOME%\lib\tools.jar;%TOMCAT_HOME%\lib\servlet.jar
Hope this helps
------------------
Multi-Platform Database Developer


Multi Platform Database Developer & DBA on E.S.T.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 'javax.servlet . * package does not exist !'
 
Similar Threads
Problem compiling Servlet
Error running servlet using tomcat.. help please
environment setting
JDBC
error with compiling servlet