Re: can I write service() ,doGet() and doPost() method in single Servlet?
Posted By:
Anonymous
Posted On:
Friday, May 27, 2005 01:52 AM
You can override all the 3 methods. But good design practice is..ONE SHOULD NEVER OVERRIDE SERVICE() METHOD BECAUSE THERE IS NO NEED FOR IT.
PALLAV
Re: can I write service() ,doGet() and doPost() method in single Servlet?
Posted By:
D_Rajasekhar
Posted On:
Tuesday, May 10, 2005 06:27 AM
It is possible legally, to write all these three methods in a single HttpServlet. But by default, service() method will be run first, irrespective of the form method in the calling html or jsp page. From there, we can divert it into the required doPost() or doGet () methods.