• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hyperlink  RSS feed

 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
If we have a hyperlink :
<a href="/myservlet" method="POST">Test</a>
In servlet class, it is handled by doGet() method.
What should we do if we want to sent that request that is handled by doPost() method()?
thanks
daniel
 
Paul Anilprem
Enthuware Software Support
Ranch Foreman
Posts: 3991
32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hyperlinks always cause a GET request. For post, you have to use a FORM having method=POST. Of course, you can invoke a javascript that submits a form on click of a hyperlink.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!