File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doPost(), doGet()

 
narender kaasam
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any one could explain me When doGet(), doPost() methods we need to write ?
I know these things.
When client send a request through "Get" method, doGet() method will be called , for "post", doPost() will be called.Except this in servlet when we need to write doGet() or doPost()....
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has been answered many times in this forum. A search will help.
 
ak pillai
author
Ranch Hand
Posts: 288
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
doGet:

The request parameters are transmitted as a query string appended to the request. Allows browser bookmarks but not appropriate for transmitting private or sensitive information.

GET was originally intended for static resource retrieval.

GET is not appropriate when large amounts of input data are being transferred.



doPost():

The request parameters are passed with the body of the request.
More secured.


POST was intended for input data submits where the results are expected to change.


Conclusion: Prefer using doPost() and in doGet() you can call doPost() method.


-- Excerpt from the book Java/J2EE Job Interview Companion
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic