#StackBounty: #java #servlets #java-ee-6 #servlet-listeners #serviceservletrequest Alternative to requestDestroyed in ServletRequestLis…

Bounty: 50

Is writing requestDestroyed as part of servlet itself like below functionally equivalent to overriding requestDestroyed as part of ServletRequestListener?

      public class MyServlet implements HttpServlet{

        public void init(ServletConfig config) throws ServletException{//init stuff}

        public void service(ServletRequest req,ServletResponse res) throws ServletException {
             //do some stuff

       private void requestDestroyed(HttpServletRequest request) {
          //some clean up stuff only for this particular servlet

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.