• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

jspInit() and jspDestroy()

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a JSP, if we want to redefine these two methods, do we declare init() and destroy() or jspInit() and jspDestroy()?
Thx in advance
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
It is jspInit() and jspDestroy().
-Sainudheen
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Shreyas Reddy:
In a JSP, if we want to redefine these two methods, do we declare init() and destroy() or jspInit() and jspDestroy()?
Thx in advance


You don't have to declare these two method. You just overwrite them like followings.
<html>
<body>
<%@ page language="java" %>
<%! int count = 0; %>
<% count++; %>
Welcome! You are visitor munber:
<%= count %>
<% jspInit() {
//your stuff goes here.
}
jspDestroy() {
//your stuff goes here.
}
%>
</body>
</html>
    Bookmark Topic Watch Topic
  • New Topic