For Running Java Servlet
1. jdk1.5.0 Kit
2. Install Tomcat6.0
3. Now set environment Variables
Right Click on My COmputer>Properties/Advanced (tab) CLick Environment Variables
Click on New Button
Variable name : JAVA_HOME
Variable value: C:\jdk1.5.0\bin;
clcik ok
now Set CLASSPATH Again Click on NEW bUTTON
Variable name : CLASSPATH
Variable value: C:\Tomcat6\lib\servlet-api.jar;
Click Ok>>Ok>> Ok
4. Make a program in NOtepad and Save in jdk\bin directory
Compile the file and This CLass file is PASTE in the following path
C:\Tomcat6\webapps\ROOT\WEB-INF
Make a new folder name (classes), in WEB-INF folder and paste in classes FOLDER
5. Now Edit the xml file in C:\Tomcat6\webapps\ROOT\WEB-INF
<servlet>
<servlet-name>Hello</servlet-name>
<servlet-class>Hello</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Hello</servlet-name>
<url-pattern>/Hello</url-pattern>
</servlet-mapping>
6. Start Monitor Tomcat from Start Menu
Server is Running in Task Bar in Green Play Button
NOW run the in Browser as
http://localhost:8080/Hello then ENTER
1. jdk1.5.0 Kit
2. Install Tomcat6.0
3. Now set environment Variables
Right Click on My COmputer>Properties/Advanced (tab) CLick Environment Variables
Click on New Button
Variable name : JAVA_HOME
Variable value: C:\jdk1.5.0\bin;
clcik ok
now Set CLASSPATH Again Click on NEW bUTTON
Variable name : CLASSPATH
Variable value: C:\Tomcat6\lib\servlet-api.jar;
Click Ok>>Ok>> Ok
4. Make a program in NOtepad and Save in jdk\bin directory
Compile the file and This CLass file is PASTE in the following path
C:\Tomcat6\webapps\ROOT\WEB-INF
Make a new folder name (classes), in WEB-INF folder and paste in classes FOLDER
5. Now Edit the xml file in C:\Tomcat6\webapps\ROOT\WEB-INF
<servlet>
<servlet-name>Hello</servlet-name>
<servlet-class>Hello</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Hello</servlet-name>
<url-pattern>/Hello</url-pattern>
</servlet-mapping>
6. Start Monitor Tomcat from Start Menu
Server is Running in Task Bar in Green Play Button
NOW run the in Browser as
http://localhost:8080/Hello then ENTER
No comments:
Post a Comment