Pere, below mentioned explanation is really helpful for beginners. Can you please shed a light on this one? I can test sevlet as http://localhost:8080/Examples/servlet/someservlet How do I change this structure to call my servlet as http://localhost:8080/servlet/someservlet or http://localhost/mydirectory/servlet/someservlet ? * Satish > -----Original Message----- > From: Pere Soler Rubi [SMTP:[EMAIL PROTECTED]] > Sent: Friday, January 07, 2000 8:57 AM > To: [EMAIL PROTECTED] > Subject: Re: How to compile a servlet? > > Hello Eric, > Firstly, you have to download JSDK in: > http://java.sun.com/products/servlet/2.1/ > You have to download the Interface Classes. Then you have to install the > JSDK. > Finally, you have to put in your PATH: > > set path=c:\jdk1.2.2\bin; > CLASSPATH=c:\jdk1.2.2\lib;c:\Jsdk2.1\lib\jsdk.jar; > > Also , if you want to compile the servlet in another directory that the > directory where is placed the servlet, you have to put in the Classpath > the > path of the directory where your servlet is. Then you will be able to > compile > correctly. > > Then, if you want to execute the servlet you have to use a Web server or > the > serveltrunner.The servletrunner is in the <JDK>/bin directory. Invoking it > with > the -help flag shows a usage message without running it: > > % ./bin/servletrunner -help > Usage: servletrunner [options] > Options: > -p port the port number to listen on > -b backlog the listen backlog > -m max maximum number of connection handlers > -t timeout connection timeout in milliseconds > -d dir servlet directory > -r root document root directory > -s filename servlet property file name > -v verbose output > % > > In order to see the default values of these options, you can call > servletrunner > with the -v switch. This will, however, start the servlet runner. Just > stop it > after you have obtained the information, if you are not ready to run it > yet, or > want it to run with something other than the default values. > > % ./bin/servletrunner -v > Server settings: > port = 8080 > backlog = 50 > max handlers = 100 > timeout = 5000 > servlet dir = . > document dir = . > servlet propfile = .:servlet.properties > > Pere Soler > > eric leung wrote: > > > Hi, > > > > I am a beginner to Java using the WindowsNT platform. > > > > I just got a sample of servlet source - one of the > > "HelloWorld.java" which contains statements > > [import javax.servlet.*; import javax.servlet.http.*; ...]. > > > > I have full download of JDK1.2.2 and have set > > PATH=JDK1.2.2\bin. I can compile successfully on > > non-servlet.java. > > > > However, I got errors when compiling a servlet. > > C:>javac HelloWorld.java > > errors: package javax.servlet not found in import > > import javax.servlet.*; > > ^ > > package javax.servlet.http not found in import > > import javax.servlet.http.*; > > ^ > > Superclass HttpServlet not found > > public class HelloWorld extends HttpServlet > > ^ > > Do I need more setting such as PATH? Do I need more > > download such as JRE1.2.2 too? or else?? > > > > Thanks, > > Eric. > > ______________________________________________________ > > Get Your Private, Free Email at http://www.hotmail.com > > > > > __________________________________________________________________________ > _ > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the > body > > of the message "signoff SERVLET-INTEREST". > > > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > > Resources: http://java.sun.com/products/servlet/external-resources.html > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html << File: Card > for Pere Soler Rub� >> ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
