clarify bt/w service() and doget/dopost()

clarify bt/w service() and doget/dopost()

Dear friends, i ve question regarding service()and doget/dopost.. the container calls service() where it does the service for the request so then wat is the role of doget/dopost plz give me presice answer..

View Answers

February 28, 2011 at 5:50 PM

Methods Of servlet:

service() method: Once the servlet starts getting the requests, the service() method is called by the servlet container to respond. The servlet services the client's request with the help of two objects. These two objects javax.servlet.ServletRequest and javax.servlet.ServletResponse are passed by the servlet container.

doGet() method is the default HTTPServletRequest method. In this user entered data is appended to the URL as query String. It can send only limited amount of data.

In doPost() method the user entered information as data and not appended to the URL.It can send any amount of data. It is secure.









Related Tutorials/Questions & Answers:

Ads