In servlets, Why do we need both GET and POST method
implementations?

Answer Posted / abhijitbaji

if you are using HttpServlet then you have to implement
doGet() and or doPost() as per the method specified in jsp.
by default method type is "GET"

if you are using GenericServlet, you have to implement
servive()

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the uses of servlet

633


What is pure servlet?

696


What's the servlet interface?

596


When jsessionid is created?

607


Is tomcat a servlet container?

577






Explain the role of dispatcherservlet and contextloaderlistener.

607


Why do we need servlet filter?

571


What is servlet looping or chaining?

658


How do you create a cookie using servlet?

579


What is a servlet context?

600


Explain the difference between a web server and a web container?

517


Servlet is pure java object or not?

719


What do you mean by servlet context?

603


What’s the use of the servlet wrapper classes??

642


Explain the servlet context.

602