This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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: 61092
    
  66

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.
 
Consider Paul's rocket mass heater.
 
subject: POST and GET method