The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Execution of servlets

Posted by Kishore on January 27, 2002 at 7:07 AM

Dear Rema/Shobha,
To run a java servlet you need to have a jsdk package version 2.0/2.1 and also a browser either IE or NN.First you set the path towards the bin directory of ur jsdk package as

set path=%path%;c:\jsdkk2.0\bin

and then set the classpath to the api directory of jsdk as

set classpath=%classpath%;c:\jsdk2.0\src;

after this two steps

you go the dos prompt and test the working of jsdk by giving following command


to run ur code first compile the program using javac

now execute the program by following command

servletrunner -d srvdir -s c:\jsdk2.0\examples\

where srvdir is the directory where u saved ur servlet file

now go the browser and in the address bar give the following command


where servletfile is the name of java file without extension

now u will get the result


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us