File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 60046
    
  65

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: 60046
    
  65

Continued here.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: override service method
 
Similar Threads
override service()
overridding service()
Service method
doubt in http methods
destroy method