aspose file tools*
The moose likes Servlets and the fly likes regarding servlet  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
Bookmark "regarding servlet  service method" Watch "regarding servlet  service method" New topic
Author

regarding servlet service method

rajender polu
Greenhorn

Joined: Sep 07, 2008
Posts: 2
in my servlet class i want override my service method.is it possible?why?

if not possible?why?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

What happened when you tried it?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
sridhar ponnusamy
Greenhorn

Joined: Sep 07, 2008
Posts: 19
yes you can override. so that you can have our own custom action like whatever method(GET,POST) comes, you can invoke our doGet() or doPost()...

-sree


scjp 1.5 --> 93%<br />scwcd 1.5 --> preparing.....
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by java sree:
so that you can have our own custom action like whatever method(GET,POST) comes, you can invoke our doGet() or doPost()...


for this purpose no need to go for override. already this stuff embedded in service()... commonly overriding the service is unlike

Hope This Helps
[ September 08, 2008: Message edited by: seetharaman venkatasamy ]
sridhar ponnusamy
Greenhorn

Joined: Sep 07, 2008
Posts: 19
yes seetharam .its really very unlike to override service method...i should have quote "regardless of which method(POST,GET) it comes..we can call doGet() (which you have all the implementations)"

thanks
Brij Garg
Ranch Hand

Joined: Apr 29, 2008
Posts: 234
Role of the service method is just to identified which method like POST or GET .. is used and then invoked doPost or doGet....

why you think of overriding service method?
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

THANKS java sree
sridhar ponnusamy
Greenhorn

Joined: Sep 07, 2008
Posts: 19
hi bittoo garg ..i was answering to rajender polu's query....
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"java sree",
Please check your private messages.
-DOM
 
Consider Paul's rocket mass heater.
 
subject: regarding servlet service method