aspose file tools
The moose likes Servlets and the fly likes doGet() Request,Response and doPost() Request,Response Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply 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: 622
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: 56192
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 8795

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, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: doGet() Request,Response and doPost() Request,Response
 
Similar Threads
doGet() calling doPost() problem -- URL line visible in destination page!
dopost within doget
servlet Session
doGet and doPost
Using get() and post() together