This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets 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: 60764
    
  65

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 agree. Here's the link: http://aspose.com/file-tools
 
subject: POST and GET method
 
Similar Threads
Javaranch mock?Question Bank ID : 16
Http method
any othe way to getParameters?
File uploading and data collection problem
Question Regarding Authentication