Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/LoginServlet.java @ 4194:17fe00c09b7c
Don't redirect to request uri
If a url is requested which isn't the FLYS start page (FLYS.html) the user had
been redirected to this page after successfull authentication. This caused wrong
redirects after a authentication is expired and if the browser preloads e.g. the
CSS file. Therefore allow to set a redirect url in the web.xml config to always
redirect the user to the correct page after successfull authentication.
Fix for flys/issue970 (Zugangsfehler FLYS 2.9.3)
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 22 Oct 2012 09:51:12 +0200 |
parents | a4c9296f6efa |
children | 0074c113bb95 |
comparison
equal
deleted
inserted
replaced
4193:f63b39799d2d | 4194:17fe00c09b7c |
---|---|
38 } | 38 } |
39 | 39 |
40 private void redirectSuccess(HttpServletResponse resp, String path, | 40 private void redirectSuccess(HttpServletResponse resp, String path, |
41 String uri) throws IOException { | 41 String uri) throws IOException { |
42 if (uri == null) { | 42 if (uri == null) { |
43 uri = path + "/FLYS.html"; | 43 String redirecturl = getServletContext().getInitParameter("redirect-url"); |
44 | |
45 uri = "/" + redirecturl; | |
44 } | 46 } |
45 resp.sendRedirect(uri); | 47 resp.sendRedirect(uri); |
46 } | 48 } |
47 | 49 |
48 @Override | 50 @Override |