Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

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

I have a few questions.

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

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?

[ July 10, 2008: Message edited by: Arjun Reddy ]
Posts: 67425
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
Ranch Hand
Posts: 10192
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arjun, these are like I told in the other post, please pick up Head First Servlets and JSP and I'm sure you will find answers.
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic