Also check out this thread on the same topic (back button).
http://tapestry.1045711.n5.nabble.com/Browser-Back-Button-td4909542.html#a4917143

The reply from Vangel is very detailed and explanatory.

Cheers,
Dragan Sahpaski



On Mon, Mar 5, 2012 at 5:49 PM, Taha Hafeez Siddiqi <
tawus.tapes...@gmail.com> wrote:

> Hi
>
> The browser back button usually shows an offline page till you refresh it.
> So, I don't think it is an issue as long as you are not able to access any
> secure links from there.
>
> Also does your logout page perform a Session#invalidate(), as it will
> ensure that the session is cleared.
>
> Finally, I will prefer to use Tynamo's tapestry-security based on Apache
> Shiro, even for the simplest of security implementation :)
>
> regards
> Taha
>
>
>
> On Mar 5, 2012, at 8:27 PM, gaurav wrote:
>
> > Hi,
> > I am getting problem in browser back button, after logout when I press
> > browser's back button
> > home page show for few seconds and then it go to login page.
> > I am new in Tapestry and using Dispatcher for authentication. I got the
> code
> > from tapestry-jumpstart or some blog. please check the code:
> >
> > public class AuthorizationDispatcher implements Dispatcher{
> >
> >       private PageRenderRequestHandler requestHandler;
> >       private ApplicationStateManager applicationStateManager;
> >
> >       public AuthorizationDispatcher(PageRenderRequestHandler handler,
> >                       ApplicationStateManager applicationStateManager) {
> >               super();
> >               this.requestHandler = handler;
> >               this.applicationStateManager = applicationStateManager;
> >       }
> >
> >
> >
> >       @Override
> >       public boolean dispatch(Request request, Response response) throws
> > IOException {
> >
> >               String loginPageName = Index.class.getSimpleName();
> >               String path = request.getPath();
> >
> >               if (path.equals("/") || path.toLowerCase().startsWith("/" +
> > loginPageName.toLowerCase())) {
> >                       return false;
> >               }
> >               User user =
> this.applicationStateManager.getIfExists(User.class);
> >
> >               if (user == null) {
> >
> >                       PageRenderRequestParameters parameters = new
> > PageRenderRequestParameters(loginPageName, new EmptyEventContext(),
> false);
> >                       this.requestHandler.handle(parameters);
> >
> >                       return true;
> >               }
> >
> >               return false;
> >       }
> >
> > }
> >
> > /**********************************************************************/
> >
> > AppModule code is :
> >
> > public static void contributeMasterDispatcher(
> >                       OrderedConfiguration configuration) {
> >
> >
> configuration.addInstance("AuthorizationDispatcher",AuthorizationDispatcher.class,
> > "after:ComponentEvent","before:PageRender");
> >       }
> >
> >
> > --
> > View this message in context:
> http://tapestry.1045711.n5.nabble.com/browser-back-button-after-logout-while-using-Dispatcher-tp5537754p5537754.html
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to