This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes overwriting service method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "overwriting service method" Watch "overwriting service method" New topic
Author

overwriting service method

dora babu
Greenhorn

Joined: Jul 07, 2007
Posts: 2
what wil happen when we overwrite service method.
Are there any advantages or disadvantages.
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hi,

It's preferred not to override the service() method.

Override either doGet() or doPost() methods and let the service() method call the right one.

Best of luck ...


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Dora,
See our servlet FAQ.

This question gets asked quite a lot here so if the FAQ doesn't answer it for you, search this forum and you'll find plenty of discussions on the subject.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: overwriting service method
 
Similar Threads
Post to Servlet from Applet doesn't work
protected Method service???
Did implicit objects are instance variables or local variables in _jspService
Web service method call behaviour?
servlets