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>