Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HttpServlet with service()

User_19BPUAug 2 2012 — edited Aug 2 2012
Hi,

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.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 30 2012
Added on Aug 2 2012
7 comments
3,312 views