Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

newbie- can't compile java servlet

 
roland edwards
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to compile my servlet and I'm getting these messages:
package javax.servlet does not exist
package javax.servlet.http does not exist
I'm using Resin-2.0.1 servlet runner.
My path statement:
PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JAVA\JDK1.3.0_02\BIN;C:\JAVA\RESIN-2.0.1\LIB
The LIB directory is where all the JAR files for Resin are located. I assume the java libraries are in JAR files but I'm a newbie - who knows?
thanks for any help.
 
Subbu Aswathanarayan
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
you need to include ur servlet.jar file in your classpath
if you are using windows, insert the following line in ur autoexec.bat
SET CLASSPATH=%CLASSPATH%;<jdk root directory>\lib\servlets.jar

for eg if you have installed jdk in c:\ then ur jdk root direcory should be C:\JDK1.3
hope this helps.
Subbu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic