Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML method for service()?

 
Ashish Hiriadka
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul for the reply I have another doubt. if we override only service method and if we are calling the servlet from html form action, which HTTP method we have to use??
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's the wrong question. You don't decide to write your HTML based on how somebody decided to write the servlet. It's the other way around. You write your HTML and decide whether to use GET or POST based on the usual meaning of those methods. Then you write the servlet which processes the request and use doGet or doPost based on how you decided to write your HTML.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic