Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

What are HTTP methods?

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic