Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

regarding servlet service method

 
rajender polu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my servlet class i want override my service method.is it possible?why?

if not possible?why?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64978
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happened when you tried it?
 
sridhar ponnusamy
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THANKS java sree
 
sridhar ponnusamy
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi bittoo garg ..i was answering to rajender polu's query....
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"java sree",
Please check your private messages.
-DOM
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic