struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeoffrey Bakker" <jeoffrey.bak...@gmail.com>
Subject Re: [S2] Refactoring Action classes
Date Wed, 06 Aug 2008 17:57:33 GMT
Maybe adding a session listener to your web.xml is a little bit easier.

E.g. a listener like below

import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;


public class DebugSessionListener implements HttpSessionAttributeListener,
        HttpSessionListener {

    @Override
    public void attributeAdded(HttpSessionBindingEvent arg0) {
    }

    @Override
    public void attributeRemoved(HttpSessionBindingEvent arg0) {
        Thread.dumpStack();
    }

    @Override
    public void attributeReplaced(HttpSessionBindingEvent arg0) {
        Thread.dumpStack();
    }

    @Override
    public void sessionCreated(HttpSessionEvent arg0) {
        Thread.dumpStack();
    }

    @Override
    public void sessionDestroyed(HttpSessionEvent arg0) {
        Thread.dumpStack();
    }
}

Greetings,
Jeoffrey


2008/8/6 Dave Newton <newton.dave@yahoo.com>:

> --- On Wed, 8/6/08, Milan Milanovic <milanmilanovich@yahoo.com> wrote:
> > I don't know really, I don't use HTTPS, my cookies are enabled, my
> > redirect action deleted my session variables, when I changed this
> > action to standard action it worked, NO other part of the code is
> > changed.
>
> What do you mean, standard action?
>
> Step through the S2 code: tell me where S2 is deleting your session
> variables.
>
> Put a monitoring interceptor between every interceptor on the stack and
> tell me which interceptor is deleting your session variables.
>
> Log the actual HttpSession and tell me it's the same session object being
> logged across action invocations.
>
> Define your own result type by copying the existing redirectAction result
> and add logging to determine when (and how) it's deleting your session
> variables.
>
> Create a minimal application that reproduces the problem and file a JIRA.
> Be **thorough** in your description (for example, originally you left out
> the bit about Acegi).
>
> Does it exhibit the same behavior if you deactivate Acegi?
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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