Thread: What JSP lifecycle methods can

Forum : Java Server Pages (Jsp)   21-4-2017 06:09:19 AM
User Image
Sriman

Newbie

Joined: Jul 15, 2016

Points: 480

Threads: 636

Posts: 153

What JSP lifecycle methods can

| Quote Date : Apr 21, 2017    Views:507    

What JSP lifecycle methods can I override?

tags: jsp j2ee

Comments

User Image
chowdaka5

Newbie

Joined : Jun 28, 2017

Points : 145

Threads: 23

Posts: 97

Re: What JSP lifecycle methods can

Reply Date : Jul 3, 2017

We cannot override the _jspService() method within a JSP page. We can override the jspInit() and jspDestroy() methods within a JSP page. jspInit() can be useful for allocating resources like database connections, network connections. It is good programming practice to free any allocated resources within jspDestroy().
The jspInit() and jspDestroy() methods are each executed just once during the lifecycle of a JSP page .

Load More

No More Comments