• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with Servlet

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My autoexec file looks like this
PATH C:\JDK1.2.1\BIN;C:\JSDK2.0\BIN;C:\JSDK2.0\src
SET CLASSPATH = .;c:\jsdk2.0\lib\jsdk.jar;C:\JDK1.2.1\LIB;C:\JSDK2.0\src;c:\jsdk2.0\lib
I am trying to run a servlet and I am getting the error
Package javax.servlet not found in import
Package javax.servlet.http not found in import.
Can somebody please tell me how to set the path or classpath so that my program runs fine.
Thanks
Sunita
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not using JSDK but!
remember that the servlet classes are "standard extensions" which belong in the
\JDK1.2\jre\lib\ext
directory. Java 1.2 does NOT have to have classpath set to find the standard extensions OR the standard library jar files.
See the tooldocs documentation.
Why are you using JSDK instead of Tomcat?
Bill
 
Sunita Vontel
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks William
I did not know about Tomcat.
But I just tried
javac -classpath c:\jsdk2.0\lib\jsdk.jar file.java
and it worked.Probably my classpath is not set correctly.

Sunita
 
Sunita Vontel
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks William
I did not know about Tomcat.
But I just tried
javac -classpath c:\jsdk2.0\lib\jsdk.jar file.java
and it worked.Probably my classpath is not set correctly.

Sunita
 
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic