MicroDat
May 1st, 2007, 10:39 AM
Hi everyone,
I am using spring 2.0.2 and I am trying to implement the HttpSessionAttributeListener interface to response to certain session activities.
Here is my class that implements the interface:
package sessionlistener;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;
public class SessionListener implements HttpSessionAttributeListener {
public SessionListener(){
}
public void attributeAdded(HttpSessionBindingEvent se) {
// TODO Auto-generated method stub
}
public void attributeRemoved(HttpSessionBindingEvent se) {
// TODO Auto-generated method stub
}
public void attributeReplaced(HttpSessionBindingEvent se) {
// TODO Auto-generated method stub
}
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListe ner
</listener-class>
</listener>
<listener>
<listener-class>
sessionlistener.SessionListener
</listener-class>
</listener>
Here is my web.xml file, notice the two listener tags, this is how I seen some tutorial add two listener class but when I try to start my app with eclipse I get this error:
SEVERE: Error listenerStart
Anyone know a solution to this? Thanks for any help.
Regards,
MD
I am using spring 2.0.2 and I am trying to implement the HttpSessionAttributeListener interface to response to certain session activities.
Here is my class that implements the interface:
package sessionlistener;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;
public class SessionListener implements HttpSessionAttributeListener {
public SessionListener(){
}
public void attributeAdded(HttpSessionBindingEvent se) {
// TODO Auto-generated method stub
}
public void attributeRemoved(HttpSessionBindingEvent se) {
// TODO Auto-generated method stub
}
public void attributeReplaced(HttpSessionBindingEvent se) {
// TODO Auto-generated method stub
}
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListe ner
</listener-class>
</listener>
<listener>
<listener-class>
sessionlistener.SessionListener
</listener-class>
</listener>
Here is my web.xml file, notice the two listener tags, this is how I seen some tutorial add two listener class but when I try to start my app with eclipse I get this error:
SEVERE: Error listenerStart
Anyone know a solution to this? Thanks for any help.
Regards,
MD