This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 18541
    
    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.
 
 
subject: HTML method for service()?
 
Similar Threads
Inicialize variables on axis app inicialization
How to create a simple webservice which returns a XML file
what is called? service method or doGet method?
Doubts in HTTP Methods behaviour
override service method