1) SAVE SERVLET PROGRAM IN BELOW
DIRECTORY OF YOUR MACHINE
C:\Program
Files\Apache Tomcat 4.0\webapps\examples\WEB-INF\classes
2) SET ENVIRONMENT VARIABLE
JUST GO TO MY COMPUTER
RIGHT CLICK ON IT .
GO TO PROPERTIES
3)
GO
TO ADVANCED TAB
CLICK ON ENVIRONMENT VARIABLE TAB
4)
SET
THE FOLLOWING PATH
i)
CLASSPATH
Variable
name: CLASSPATH
Variable
value: C:\Program Files\Apache Tomcat
4.0\common\lib\servlet.jar; C:\Program Files\Java\jdk1.5.0_06;
PATH
ABRIVIATION
CLASSPATH
Path
up to Apache tomcat\common\lib\servlet.jar file,then semicolon followed by jdk
directory.
ii)
PATH
Variable
name: PATH
Variable
value: C:\Program Files\Java\jdk1.5.0_06\bin;
PATH
ABRIVIATION
PATH
Path
up to jdk\bin directory .
5)
AFTER
THAT COPY servlet.jar FILE FROM
C:\Program Files\Apache Tomcat
4.0\common\lib
AND PASTE IN FOLLOWING DIRECTORY
C:\Program
Files\Java\jre1.5.0_06\lib\ext
OPEN COMMAND PROMPT & COMPILE
SOURCE PROGRAM
6)
Start tomcat server,
7)
Go to Internet Explorer, Type
following URL
8)
Thank
you