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 2003/01/30 01:24:05 UTC
DO NOT REPLY [Bug 16574] New: -
java.lang.NullPointerException in classes that implement HttpSessionBindingListener
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16574>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16574
java.lang.NullPointerException in classes that implement HttpSessionBindingListener
Summary: java.lang.NullPointerException in classes that implement
HttpSessionBindingListener
Product: Tomcat 4
Version: 4.1.18
Platform: Other
OS/Version: Windows NT/2K
Status: UNCONFIRMED
Severity: Normal
Priority: Other
Component: Servlet & JSP API
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: jorge_middleton@yahoo.com
The problem is, that when replace a session attribute that implements
HttpSessionBindingListener, in the valueUnbound method I get
java.lang.NullPointerException.
example:
public void valueUnbound(HttpSessionBindingEvent be) {
User u = (User)be.getValue();
System.out.println("The user " + u.getName() + " was unbounded");
}
I believe that the error is that in line 1250 of StandardSession
(new HttpSessionBindingEvent((HttpSession) this, name));
you have put (new HttpSessionBindingEvent((HttpSession) this, name, unbound));
In the specification of Servlet 2.3, the method getValue() of
HttpSessionBindingEvent class say:
.... If the attribute was replaced, this is the old value of the attribute.
Thank for your attention and sorry for my english. I you don't understand me,
please let me know.
Jorge L. Middleton
Bs. As. Argentina
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org