What are the methods in HttpServlet?

Answer Posted / abdul

I just wanted to update my answer:-

Methods in HttpServlet

Http methods which can be implemented by Service method are:
---------------------
doGet().
doPost()
doPut().
doTrace()
doDelete()
doHead()
doOptions()

* Note :doConnect() is not present in HttpServlet. The
developers of the API didn't feel the use of doConnect in
Servlet.

Other methods:
Service(HttpServletRequest,HttpServletResponse)
getLastModified(HttpServletRequest)
Service(ServletRequest,ServletResponse)

Is This Answer Correct ?    16 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What if we pass negative value in load-on-startup?

807


Which event is fired at the time of session creation and destroy?

880


How to upload a file to the server using servlet?

535


How do you configure a centralized error handler in servlets?

537


When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?

580






When a client request is sent to the servlet container, how does the container choose which servlet to invoke?

580


How the typical servlet code look like ?

639


What’s the difference between forward() and sendredirect() methods?

577


The code in a finally clause will never fail to execute, right?

607


What is a web application and what is it’s directory structure?

588


What is the requirement of servlet config and servlet context implemented and how are they implemented?

545


How can we implement a jsp page?

632


What is servlet mapping?

603


What is java servlet session?

533


Which protocol will be used by browser and servlet to communicate

584