Two Laptop Bag*
The moose likes Servlets and the fly likes HTML method for service()? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTML method for service()?" Watch "HTML method for service()?" New topic
Author

HTML method for service()?

Ashish Hiriadka
Greenhorn

Joined: Feb 27, 2011
Posts: 5
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
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTML method for service()?