Explain the working of service() method of a servlet.
Answer / Ravindra Kumar Upadhyay
The service() method in a servlet is responsible for processing requests from clients. It receives an HttpServletRequest object and returns an HttpServletResponse object. The container decides which service() method to call based on the type of request (GET, POST, etc.). By default, it calls doGet() or doPost(), depending on the request type.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference in between the httpservlet and generic servlet?
How a servlet is unloaded?
What is the workflow of a servlet?
can i call init() method in destroy() method of servlset. ?
What are the disadvantages of storing session state in cookies?
Can a jsp be called using a servlet?
How do cookies work in servlets?
What is the difference between Get and Post Method?
What methodology can be followed to store more number of objects in a remote server?
What are the supporting protocol by HttpServlet ?
Is java servlet still used?
What is servletconfig?