You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Thomas Hackel <th...@bi-so.com> on 2004/10/14 11:40:13 UTC

Invalidate Session/Visit

Hi there!

How to invalidate a session or better the visit with tapestry?
When the user does a logout all stored data should be forgotten.
But currently all stuff (Tablesorting, Tablepage) are still in the session.
I've search through the API docs but did not found anything which could 
to the job?
Or maybe i did not catch the principle :-/
Please give a hint...

Thanks in advance,
Thomas Hackel

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Invalidate Session/Visit

Posted by Markus Wiederkehr <as...@fantasymail.de>.
I use the following:

<a jwcid="@ServiceLink"
   service="ognl:@org.apache.tapestry.Tapestry@RESTART_SERVICE">
  Log out
</a>

That invalidates the HTTP session. If you have custom cleanup to do
extend BaseEngine and override the restart() method. Something like
this:

public void restart(IRequestCycle cycle) throws IOException
{
  cleanup((MyVisit) getVisit());
  super.restart(cycle);
}

private void cleanup(MyVisit visit)
{
  // ...
}

Markus


On Thu, 2004-10-14 at 11:40, Thomas Hackel wrote:
> Hi there!
> 
> How to invalidate a session or better the visit with tapestry?
> When the user does a logout all stored data should be forgotten.
> But currently all stuff (Tablesorting, Tablepage) are still in the session.
> I've search through the API docs but did not found anything which could 
> to the job?
> Or maybe i did not catch the principle :-/
> Please give a hint...
> 
> Thanks in advance,
> Thomas Hackel
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org