1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

servlet basic

Discussion in 'Java' started by Manojbijnori, Jul 28, 2010.

  1. Manojbijnori

    Manojbijnori New Member

    Joined:
    Jun 16, 2009
    Messages:
    29
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Lecturer In Computer Science Department In Enginer
    Location:
    Bijnore
    tell me the method of running the servlet program on Tomcat6.0


    whole procedure
     
  2. fourthdimension

    fourthdimension New Member

    Joined:
    Jan 8, 2009
    Messages:
    144
    Likes Received:
    11
    Trophy Points:
    0
    Home Page:
    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.
     

Share This Page