Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

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

Ads

 
 

Share on Google+Share on Google+

praveen kumar
clarify bt/w service() and doget/dopost()
1 Answer(s)      6 years and 5 months ago
Posted in : Servlet Interview Questions

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..

Ads
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.


Ads









Related Tutorials/Questions & Answers: