Results 1 to 9 of 9

Thread: Running servlet

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Resolved Running servlet

    I'm using Eclipse and wanted to run a simple servlet. I made a project on the workspace as you can see on the attached image. And got a code on WEB-INF/src on temp project
    VB Code:
    1. package net.nevyn.brownmonkey;
    2.  
    3. import java.io.IOException;  
    4. import java.io.PrintWriter;    
    5.  
    6. import javax.servlet.ServletException;
    7.  
    8. import javax.servlet.http.HttpServlet;
    9. import javax.servlet.http.HttpServletRequest;
    10. import javax.servlet.http.HttpServletResponse;
    11.  
    12. public class FirstServlet extends HttpServlet{
    13.     public void doGet(HttpServletRequest request,
    14.             HttpServletResponse response) throws ServletException,IOException{
    15.         PrintWriter out=response.getWriter();
    16.         out.println("Hello World");
    17.         out.close();
    18.     }
    19. }
    How do I run the FirstServlet? Can't seem to find an answer. All I found on the net was putting my class to ROOT/WEB-INF/classes on Tomcat's installed folder. Any articles or links for this stuff is very well accepted and thanked.

    Thank you so much.
    Attached Images Attached Images  
    Last edited by nebulom; May 25th, 2005 at 04:41 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width