Results 1 to 3 of 3
  1. #1
    Peter is offline Senior Member
    Join Date
    Jun 2007
    Posts
    119
    Rep Power
    0

    Default Servlet question

    Even though we have a service() method in servlets, why do we go for a doGet() or a doPost() method? Is there any advantage of these doGet and doPost over service() method?

    Peter

  2. #2
    Ed
    Ed is offline Senior Member
    Join Date
    Jun 2007
    Posts
    110
    Rep Power
    0

    Default

    service method is in GenericServlet,
    doGet, doPost are methods in HttpServlet(extends GenericServlet).
    Generally HttpServlet is used for applications wherever http protocol is used

  3. #3
    Heather is offline Senior Member
    Join Date
    Jun 2007
    Posts
    164
    Rep Power
    8

Similar Threads

  1. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 09:49 AM
  2. Servlet vs JSP
    By javaplus in forum Java Servlet
    Replies: 5
    Last Post: 06-26-2008, 11:19 PM
  3. my first servlet
    By sireesha in forum Java Servlet
    Replies: 3
    Last Post: 04-09-2008, 04:11 PM
  4. Servlet Question
    By sandor in forum Java Servlet
    Replies: 5
    Last Post: 12-19-2007, 12:27 PM
  5. Replies: 1
    Last Post: 08-07-2007, 04:47 PM

Posting Permissions

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