Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

about service method  RSS feed

 
bharatyadav
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi good evening to all,

why can't i override the service() in httpServlet compare to genericServlet


Thank's in advance
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would you want to? (Hint: read the JavaDocs for the service method)
 
binaya patel
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can ovride the service method but in HttpServlet other then service mathod there are other method like doGet(),doPost(), doHead()..... is present.If u override the service method in httpservlet then it can't able to call other method like doGet(), doPost().... autometically. u hava to call expictly these methods.For this reason generally we will not override the service method in HttpServlet.I think it helps to clear your doubt.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!