aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes POST and GET method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "POST and GET method" Watch "POST and GET method" New topic
Author

POST and GET method

Lin Cao
Greenhorn

Joined: Oct 22, 2011
Posts: 7
You are creating a web form with this HTML:
<form action="sendOrder.jsp">
<input type="text" name="creditCard">
<input type="text" name="expirationDate">
<input type="submit">
</form>

Which HTTP method is used when sending this request from the browser?
A. GET
B. PUT
C. POST
D. SEND
E. FORM

Answer: A

I think the answer must be wrong, why don't use POST? There are two sensitive data! Am I right?


SCJP: 93%, SCWCD: 97%
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

Lin Cao wrote:are two sensitive data! Am I right?

What does sensitive data have to do with regards to GET versus POST?

Besides, the question isn't asking what you should do, but what will happen.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Lin Cao
Greenhorn

Joined: Oct 22, 2011
Posts: 7
Oh, I get it, the default method is GET.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: POST and GET method