This discussion is archived
7 Replies Latest reply: Aug 2, 2012 3:59 AM by 800839 RSS

HttpServlet with service()

800839 Newbie
Currently Being Moderated

I have a servlet which extends HttpServlet , can we override the service() for HttpServlet?
For example I have the below in my HttpServlet like:-

class CustomServlet extends HttpServlet {

void doGet(..)

void doPost(...)

void service(..) // generic servlet method


In such case whether all the 3 methods will get invoked including the service() as these are all container specific.
Please clarify.



  • Correct Answers - 10 points
  • Helpful Answers - 5 points