Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doGet() Request,Response and doPost() Request,Response

 
Arjun Reddy
Ranch Hand
Posts: 629
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a few questions.

1).
I always wondered what a doGet()'s request and response does and what a doPost()'s request and response does? Any ideas on this?

2).
Is it ok if I use doPost() all the time instead of a doGet() due to it's benefits when the two methods are compared?

3). writing all the code in doPost() and calling it from doGet(), what is the advantage in this?

Thanks.
Thanks.
[ July 10, 2008: Message edited by: Arjun Reddy ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) This question makes no sense to me.

2) If you don't implement doGet(), GET requests will not be served. If all you are going to make is POSTs, that's fine. Otherwise...

3) Then both GETs and POSTs are handled identically.
 
Joe Harry
Ranch Hand
Posts: 10090
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arjun, these are like basics...as I told in the other post, please pick up Head First Servlets and JSP and I'm sure you will find answers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic