4 Replies Latest reply: Aug 2, 2012 5:59 AM by 800839 RSS

    Override _jspService in JSP page

    800839
      Hi,

      Can we override _jspService() in JSP like the below:-

      <%!

      public void _jspService(...){


      }

      %>

      I know that we can override the jspInit() and jspDestroy() whether the same can be done for _jspService()
      as well?

      Please clarify.

      Thanks.
        • 1. Re: Override _jspService in JSP page
          r035198x
          The API specs for HttpJspPage say

          +The _jspService()method corresponds to the body of the JSP page. This method is defined automatically by the JSP container and should never be defined by the JSP page author.+                                                                                                                                                                                                                                                                                                                                                                                                                                           
          • 2. Re: Override _jspService in JSP page
            800839
            Thanks. But the jspInit() and jspDestroy() can be overidden in the JSP page right?
            • 3. Re: Override _jspService in JSP page
              r035198x
              Yes, they can. Apart from those the rest of your JSP defines what gets executed when your _jspService is called so you can't redefine it again.                                                                                                                                                                                                                                                                                               
              • 4. Re: Override _jspService in JSP page
                800839
                Thanks.