This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Overridding service Method

 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

My upcoming project is in jsp/servlet which follows MVC (maintenance project). In that project developer ask to extends BaseServlet which override servlet's service method . code is given below




Here they Override service method. but overridding the service method is not good practise right ?. suppose if i call GET or POST method from form then only this service method is encounter.

so rancher, please give some light on this .


 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is their reasoning for overriding service()? There are instances where it might be appropriate, but it looks as if this is intended to use as a base class for all servlets.

And this is an atrocity:

Do they not realize that this means that no exceptions can propagate out to the container to be handled in a standard fashion using deployment descriptor error handlers?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:There are instances where it might be appropriate, but it looks as if this is intended to use as a base class for all servlets.

yes. but if you are their place then what would be your approach ? (if you dont mind,can you please elaborrate )
Bear Bibeault wrote:
And this is an atrocity:

Do they not realize that this means that no exceptions can propagate out to the container to be handled in a standard fashion using deployment descriptor error handlers?


yes. I agree , you are correct .
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic