The jsp page is compiled into a servlet. It has methods jspInit() , jspService(HttpServletRequest, HttpServletResponse) , jspDestroy() .

Question number 1

Correctly, I understand that the jsp methods are the methods of the servlet into which it is compiled?

Question number 2

How to override jspInit() on jsp page?

    1 answer 1

    1) depending on what you mean. Since these methods will be inside the compiled servlet - yes, these are the methods of this servlet. But if it is meant whether, for example, jspInit () is a direct analog of the init () method from the Servlet interface, then no, this is another method from the JspPage interface, which, in turn, extends the Servlet interface and, therefore, contains all its methods, including init ().

    2) add a scriptlet to your jsp (will not work if scripts are not allowed in jsp)

     <%! public void jspInit() { //делайте, что хотите. Только зачем? } %>