Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   servlet basic (http://www.go4expert.com/forums/servlet-basic-t22850/)

Manojbijnori 28Jul2010 20:08

servlet basic
tell me the method of running the servlet program on Tomcat6.0

whole procedure

fourthdimension 1Aug2010 09:35

Re: servlet basic
Without an ide (as well as I can remember):

1. Write your servlet.
2. Download tomcat.
3. Put your servlet in the tomcat webapps folder under a folder named after your web app.
4. Inside that folder, create folders WEB_INF and WEB_INF/classes.
5. In the WEB_INF folder, create and populate web.xml with information on how to access your servlet. See the tomcat documentation for information on this.
6. Start up tomcat. Your servlet is now active on localhost:8080/servlet or however you listed it in the web.xml.

Using netbeans:
1. Create a new java web application project. When the wizard asks what server you want to use, choose tomcat 6.0. You may need to download a plugin from the plugin list if your netbeans didn't come packaged with this capability.
2. Code your servlet.
3. Populate the web.xml.
4. Right click on the project and click deploy.
5. Your servlet is now active on localhost:8080/servlet, or however you listed it in the web.xml.

Hope that helps some. I can give more specific details when I'm back on my development machine if you need more info.

All times are GMT +5.5. The time now is 01:56.