tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Bednarz" <>
Subject Bug in implementation of HttpSessionAttributeListener with Tomcat 4.0.1 ??
Date Thu, 11 Apr 2002 15:55:05 GMT

I have a very funny behaviour when using the HttpSessionAttributeListener interface.

I have derived a class from HttpSessionAttributeListener and implemented the two methods

- public void attributeAdded(HttpSessionBindingEvent se)
- public void attributeRemoved(HttpSessionBindingEvent se)

Both worked fine until I have disabled cookie support!

When cookie support is disabled in a browser TOMCAT usually performs automatically URL rewriting
(this assumes that the application also makes use of HttpServletResponse.encodeURL(...) whenever
URL's are hardcoded for <a> tags or <form action=.....> tags. I have done this
in my application and was just tesing all my stuff when I noticed that this does not work

OK now back to the HttpSessionAttributeListener implementation. The method attributeAdded()
is still called correctly when using URL rewriting. The method attributeRemoved() gets NEVER
called when URL rewriting is used (cookies are not allowed in the browser)

I am still using Tomcat 4.0.1 and I can reproduce this behaviour anytime. I have not yet upgraded
to 4.0.3 yet and therefore cannot say whether it is working there correctly.

Does anybody else have the same problem? Could someone give me advice what I have to do? Can
I somehow help to track down the problem?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message