Add original URL when redirecting to login page.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 21 Mar 2011 15:14:52 +0000 (16:14 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 21 Mar 2011 15:14:52 +0000 (16:14 +0100)
src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java

index a7df9c2..5604c82 100644 (file)
@@ -204,7 +204,7 @@ public class SoneTemplatePage extends TemplatePage {
        @Override
        protected String getRedirectTarget(Page.Request request) {
                if (requiresLogin() && (getCurrentSone(request.getToadletContext(), false) == null)) {
-                       return "login.html";
+                       return "login.html?target=" + request.getHttpRequest().getPath();
                }
                return null;
        }