jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes doGet() Request,Response and doPost() Request,Response Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "doGet() Request,Response and doPost() Request,Response" Watch "doGet() Request,Response and doPost() Request,Response" New topic
Author

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

Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
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 ]

Be Humble... Be Nice.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63208
    
  69

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9953
    
    3

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.


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: doGet() Request,Response and doPost() Request,Response
 
It's not a secret anymore!