wood burning stoves 2.0*
The moose likes Servlets and the fly likes can't compile servlets- Please Help! 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 » Servlets
Bookmark "can Watch "can New topic
Author

can't compile servlets- Please Help!

eskay kumar
Ranch Hand

Joined: Jul 22, 2000
Posts: 71
Hi!
I really need help in what I am doing wrong here. I have read a lot of posts here for an answer and now have no other alternative but to post a fresh one with my problem. SO PLEASE HELP ME! I want to work on servlets and this is what I have done, but i am unable to compile my servlets - i get package import javax.servlet not found.
My OS= win 98
jdk1.2.2 (this has been working just fine)
recently installed JSWDK1.2.2
recently installed Tomcat Application Server
I have done the following settings so far:
c:\Program Files\tomcat> set TOMCAT_HOME=c:\Proram Files\tomcat
c:\jdk1.2.2> set JAVA_HOME=c:\jdk1.2.2
In AutoExec my path is set as follows:
PATH C:\ORACLE\BIN;;C:\ORAWIN95\BIN;C:\JDK1.2.2\BIN;C:\jdk1.2.2\lib\tools.jar; C:\Program Files\jswdk\lib\servlet.jar
What is the difference between path and classpath, how does one go about setting them. What command do we use to check the existing classpath? I don't want to mess around with it - untill i know whatever is already set there.
I use Autoexec.bat in Sysedit to set my path. I guess for setting classpath one has to go to dos prompt and use
set classpath=c:\jdk1.2.2; ....... etc. Does one have to reset the earlier settings or can we just update on whatever is there.
Thanks for reading,
shilpa
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
In order to compile servlets you have to have the servlet.jar file in classpath. Edit your autoexec.bat file's set classpath line to include the full path of servlet.jar file, and after saving this autoexec.bat file come to DOS prompt and type c:\autoexec.bat [ENTER] to make the new settings come to effect. To see what are the current settings used, just type set[ENTER] at the DOS prompt. You will be listed with all the env. vars and their settings.
set classpath = %CLASSPATH%;C:\Program Files\jswdk\lib\servlet.jar
regds
maha anna
[This message has been edited by maha anna (edited October 07, 2000).]
[This message has been edited by maha anna (edited October 07, 2000).]
rahul pathak
Greenhorn

Joined: Aug 24, 2000
Posts: 11
hi,
there no jswk directory in tomcat
i am using jakarta-tomcat on win 98 i have set classpath for servlet.jar as follows (Itworks )<br>
]SET CLASSPATH=%Classpath%;C:\jakar~1\lib\servlet.jar;
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can't compile servlets- Please Help!