File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Http method

 
dolly shah
Ranch Hand
Posts: 383
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<html>
<body>
<form action=�/servlet/comment�>
<p>Please provide your comment here:</p>
<input type=�text� size=�40� name=�Comment�>
<input type=�submit� value=�Submit�>
</form>
</body>
<html>

A.GET-answer
B.POST
C.HEAD
D.TRACE
E.PUT

Why the answer is "A"? Though in form action there is no method so default is GET, but from the input type='submit' isn't it call to POST method? Correct me if I am wrong.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The submit button doesn't change the method type. If nothing is specified in the form tag, the method will be a GET.
 
dolly shah
Ranch Hand
Posts: 383
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Marc. I got it now.
 
Urs Waefler
Ranch Hand
Posts: 77
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a better explanation, it is simple.

If nothing is mentioned, it is GET. GET is the default value, that�s it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic