Home Answers Viewqa JSP-Servlet doGet() Vs doPost()

 
 


Chandra Bhushan
doGet() Vs doPost()
1 Answer(s)      a year and 11 months ago
Posted in : JSP-Servlet

plz explain the differences between both of these methods used in a servlet. also give an example of both the methods.

thanks.

View Answers

June 12, 2011 at 4:06 PM


A doGet() method is limited with 2k of data to be sent, and doPost() method doesn't have this limitation. A request string for doGet() looks like the following:

http://www.roseindia.com/svt1?p1=v1&p2=v2&...&pN=vN

doPost() method call doesn't need a long text tail after a servlet name in a request. All parameters are stored in a request itself, not in a request string, and it's impossible to guess the data transmitted to a servlet only looking at a request string.









Related Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.