1. jspInit(): It is used to perform initialization process. This method is called by the web container only once when first request comes.
Syntax:public void jspInit()
2. _jspService(): This method is called by web container every time when a request is come for the jsp.
Syntax: public void _jspService() throws ServletException,IOException
Note: In this method underscore (_) represents that implementation of this method is provided by auto generated servlet and it can’t be overridden by developer.
3. jspDestroy(): It is used to perform cleanup process before destroying jsp page. This method is called by the web container only once.
Syntax: public void jspDestroy()
- What are JSP lifecycle methods?
- Which JSP lifecycle methods can be overridden?
- How to disable session in JSP?
- Which directive is used in jsp custom tag?
- How can a thread safe JSP page be implemented?
- Can we use JSP implicit objects in a method defined in JSP Declaration?
- Which implicit object is not available in normal JSP pages?
- What is difference between include directive and jsp:include action?
- How to disable caching on back button of the browser?
- What are the types of JSTL tags?
- How is scripting disabled?
- How to extend java class in jsp?