Ques : What is jspInit()

, , No Comments

 The jspInit() method is called only once during life cycle of a JSP, similarly,

servlet also have an init() method whose purpose is same as that of jspInit(). jspInit() method
is used to initialize objects and variables that are used throughout the life cycle of JSP. This
method is defined in JspPage interface. This method is invoked when the JSP page is
initialized. It has no parameters, return no value and thrown no exceptions. The signature of
the method is as follows:


public void jspInit() { // Initialization code }

0 टिप्पणियाँ:

Post a Comment