This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread 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


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: 63208
    
  69

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.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: POST and GET method
 
It's not a secret anymore!