This Question is Answered 

    How To Create Servelets In Java?

    asked 2 years ago

    Can't find what you're looking for?

    Ask a Question, Get an Answer ASAP


    1 Answer


    A very simple hello world servlet would look like this:

    package test;

    import java.io.*;

    import javax.servlet.http.*;
    import javax.servlet.*;

    public class HelloServlet extends HttpServlet {
    public void doGet (HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException
    {
    PrintWriter out = res.getWriter();

    out.println("Hello, world!");
    out.close();
    }
    }

    answered 2 years ago   

    New Comment

    500 characters left


      What is Blurtit ?

      Ask questions on any topic, get great answers from real people for FREE. Blurtit has hundreds of thousand of members so your sure to get the answer your looking for.

      Ask a Question.

        Ask a Question