You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/01/01 07:32:41 UTC
DO NOT REPLY [Bug 32908] New: -
context-param s not available from ServletContextListener contextDestroyed() unless prior call to getInitParameter()
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32908>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32908
Summary: context-param s not available from
ServletContextListener contextDestroyed() unless prior
call to getInitParameter()
Product: Tomcat 5
Version: 5.5.4
Platform: PC
OS/Version: Windows 2000
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: brett_s_r@yahoo.com.au
context-param s not available from contextDestroyed() of a
ServletContextListener, unless a prior call has been made to to getInitParameter
().
Calling getInitParameter() triggers the merging of web.xml context-param s and
Tomcat application parameters through ApplicationContext mergeParameters(). If
not called prior to the execution of contextDestroyed(), the context-param s
are lost, as ContextConfig removes them prior to the listener running:
// Removing parameters
String[] parameters = context.findParameters();
for (i = 0; i < parameters.length; i++) {
context.removeParameter(parameters[i]);
}
The removal of the merged ApplicationParameter[] s has been commented out in
the same method, so provided the merge has occured, nothing is lost, otherwise
the context-param s are unavailable.
Solution is to also not remove the web.xml parameters during ContextConfig.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org