This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

URGENT... running a simple servlet  RSS feed

 
amit tamhankar77
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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
------------------
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • 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.
 
sharad goswami
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
------------------
 
Andrew Kwong
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!