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: [email protected]
For additional commands, e-mail: [email protected]