i try to implement a logout feature like yahoo, squirrelmail, etc.
That means, when you klick "logout", you are redirected to a logout page.
When pressing the browsers back button, you are redirected to the login
page again.

This could look something like that (independent of caching - so you don't need to set headers):

Layout.java (or a BasePage.java):
Object onActionFromLogout()
{
  loginService.logout();
  return Logout.class;
}

public Object onActivate()
{
  if(loginService.isAuthenticated())
    return this;
  else
   return Login.class;
}

I've tried to implement that with:
@Inject
private Response response;
...
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma","no-cache");

Where do you add this two lines? This should work if you add the headers before content is sent. I just tried that with the quickstart archetype - I added the following lines to the Layout.java and it works:
@Inject
private Response response;

@BeginRender
public void addHeaders()
{
    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma","no-cache");
}

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to