Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What are HTTP methods?

 
C. Magmanum
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to the servlet technology world, can anyone help me out?
The first section of the exam objectives for the SCWCD is about HTTP methods. I did a quick search in the API for the HTTP class but there is none.

What are HTTP methods, please?
 
Jeremy Wilson
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The servlet interface uses two paramters. The first is the request and the second is the response. Check the j2ee api documentation for

HttpServletRequest and HttpServletResponse. That should get you started.
 
Nitish Bahadur
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For example, GET maps to doGet, POST maps to doPost, HEAD maps to doHead.....you will find all but doConnect. So when a user submits a form with method="GET" the doGet in the corresponding servlet is executed.
 
Prasad Pusapati
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
According To HTTP1.1 Specification Following Are The HTTP Methods.
GET,POST,PUT,DELETE,OPTIONS,TRACE,HEAD.
For Every HTTP Method There Is Corresponding doXXX()[ Example For GET There Is doGET() In HttpServletRequest Interface.] In HttpServletRequest Interface.
If The Form Method Is GET Container Calls doGet() On Requested Servlet Resource.
BUT THERE IS NO doConnect() Method.Servlet API Doesn't Support doConnect() EvenThough It Is HTTP1.1 Method.
Regards,
Prasad.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic