Help coderanch get a
new server
by contributing to the fundraiser
  • 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

URGENT... running a simple servlet

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys,
I have just installed JavaWebServer2.0 and i have the jdk1.1.3 installed both on C: . i cant get to compile my servlet. it says package javax.servlet does not exist. do i need to change my class path or path settings... if so, what is the required modification i make to the one present already, like does it need to include some jar file. if so which one...
thanks.. please reply soon.
Amit
------------------
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are two issues...

1. Do not use javawebserver2.0 (and now that I read that more closely, jdk1.1.3??, you meant 1.3.1 right?) These are very old versions, and are several minor point releases behind the current specs.

Tomcat is now the reference implementation from Sun, and you can find it and the most recent servlet spec here: http://java.sun.com/products/servlet/download.html

2. servlet.jar needs to be in your CLASSPATH in order for you to compile servelts.
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its a very common problem set the class path jsdk i mean and thing is done ...
 
amit tamhankar77
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi there
where do i find servlets.jar ? do i have to install j 2 sdk ? coz i didnt find servlets.jar in the jdk1.3.1 directory.. thanks a lot.. is there anything like java servlets development kit ? (JSDK) that i can download and work with ?
thanks again..
Amit
------------------
 
amit tamhankar77
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

hi all
downloaded J 2 SDK also. i am unable to find the servlets.jar or jsdk.jar file there in... how do i set the classpath then ? i am stuck !!!
thanks
Amit
------------------
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Amit,
You should first download Tomcat 4.0.1 from Sun as Mike suggested. Once you have downloaded Tomcat and installed it on your machine, you should be able to find servlet.jar in the Tomcat folder under the directory common\lib. For example, if you have installed Tomcat in the directory C:\Tomcat 4.0.1, you should be able to find the file C:\Tomcat 4.0.1\common\lib\servlet.jar.
You then include this file in your classpath.
Andrew
 
My name is Inigo Montoya, you killed my father, prepare to read a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic