dcsimg
Servlet
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   nisha_gupta
Posted On:   Monday, July 4, 2005 01:27 AM

please tell me step by step procedure to set classpath, comile servlet and deploy servlet on tomcat

Re: Servlet

Posted By:   Nandkumar_Naik  
Posted On:   Monday, July 4, 2005 03:06 AM

Hi Hisha,

I've tomcat5.5.9 on Windows XP



The classpath for compiling servlets is

"C:Program FilesApache Software Foundation omcat5.5commonlibservlet-api.jar"



On a terminal window set the command as

set classpath=%classpath%;.;C:Program FilesApache Software Foundation omcat5.5commonlibservlet-api.jar



Then compile your servlet using javac



Say javac MyServlet.java



Dump the resulting .class file in

"C:Program FilesApache Software Foundation omcat5.5webappsservlets-examplesclasses" directory



Make the following entries in web.xml file





MyServlet

MyServlet









MyServlet

/servlet/MyServlet







Then in IE type the url


http://localhost:8080/servlets-examples/servlet/MyServlet




Bye...


Nandkumar
About | Sitemap | Contact