# HG changeset patch # User Bjoern Ricks # Date 1342165822 0 # Node ID 6266dff93ed2d39a259037cc417ffded1e9b03c3 # Parent 229c34d6e87b9400f77ed118891062f7a5218f4b Use servlet context to specify the authentication method. Using the servlet context allows to set the method globally and not only for one servlet. flys-client/trunk@4968 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 229c34d6e87b -r 6266dff93ed2 flys-client/src/main/java/de/intevation/flys/client/server/LoginServlet.java --- a/flys-client/src/main/java/de/intevation/flys/client/server/LoginServlet.java Fri Jul 13 07:12:06 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/LoginServlet.java Fri Jul 13 07:50:22 2012 +0000 @@ -76,7 +76,7 @@ private Authentication auth(String username, String password, String encoding) throws AuthenticationException, IOException { - String auth = this.getInitParameter("authentication"); + String auth = this.getServletContext().getInitParameter("authentication"); return AuthenticationFactory.getInstance(auth).auth(username, password, encoding); } } diff -r 229c34d6e87b -r 6266dff93ed2 flys-client/src/main/webapp/WEB-INF/web.xml --- a/flys-client/src/main/webapp/WEB-INF/web.xml Fri Jul 13 07:12:06 2012 +0000 +++ b/flys-client/src/main/webapp/WEB-INF/web.xml Fri Jul 13 07:50:22 2012 +0000 @@ -8,6 +8,8 @@ server-url http://localhost:8181 + authentication + GGInA @@ -481,10 +483,6 @@ login de.intevation.flys.client.server.LoginServlet - - authentication - GGInA -