wood burning stoves 2.0*
The moose likes Servlets and the fly likes override service method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

override service method

Ashish Hiriadka
Greenhorn

Joined: Feb 27, 2011
Posts: 5
I am new to the servlet. I see in the Servlet code mentioned (in another topic), service method is overriden instead of overriding doGet or doPost. can we do this? if we can override, which HTTP method we should use in jsp?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61414
    
  67

Paul Clapham wrote:That's a bad practice. You should override doGet if your HTML code uses the GET method to request the servlet, and you should override doPost if your HTML code uses the POST method.


[Bear: sorry Paul, I split this incorrectly]


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61414
    
  67

Continued here.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: override service method