Monday 29 August 2011

SERVLET DEPLOYMENT STEPS

Set the PATH as:
C:\Program Files\Java\jdk1.5.0_05\bin
Set the CLASSPATH as :
C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar
write the java file and compile it and copy the classfile into the following folder
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\servlets-examples\WEB-INF\classes
Update the XML FILE: web.xml
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\servlets-examples\WEB-INF
<servlet>
        <servlet-name>RequestInfo</servlet-name>
        <servlet-class>RequestInfo</servlet-class>
    </servlet> 
 <servlet-mapping>
        <servlet-name>RequestInfo</servlet-name>
        <url-pattern>/servlet/RequestInfo</url-pattern>
    </servlet-mapping>

Run Tomcat welcome page
http://127.0.0.1:8080/servlets-examples\servlet\HelloWorld1

No comments:

Post a Comment