https://issues.apache.org/bugzilla/show_bug.cgi?id=45774
Summary: jspDestroy called after deployment, the second jspInit
follows
Product: Tomcat 5
Version: 5.5.26
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
Created an attachment (id=22549)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=22549)
demo jsp and servlet with index.html. Install into $CATALINA_HOME/webapps
I am not sure if this is a duplicate of
https://issues.apache.org/bugzilla/show_bug.cgi?id=41606, but it sounds a bit
different and applies to 5.5.26.
The jsp is deployed without explicit web.xml definition, so it is loaded when
the first client request arrives. The call sequence is usually (but not always)
as follows:
jspInit
_jspService
jspDestroy
jspInit
_jspService
_jspService
etc..
This is hard to program around when using jspInit to set up a complex set of
background processes. They get torn down unnecessarily, only to be loaded up
immediately afterward. However, there is enough variability to make it
dangerous to assume the first jspDestroy will always be followed by jspInit -
it might be a REAL jspDestroy and the cleanup is really necessary.
I have attached a war that demonstrates the problem. There is an index.html
that will run either a demo servlet (which works properly with init/destroy) or
a demo jsp (which usually fails). The apps display the call sequence
graphically, but entries are also written to the catalina log file.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]