=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/DefaultAuthenticationSuccessHandler.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/DefaultAuthenticationSuccessHandler.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/DefaultAuthenticationSuccessHandler.java 2013-10-15 09:35:46 +0000 @@ -49,14 +49,15 @@ public class DefaultAuthenticationSuccessHandler extends SavedRequestAwareAuthenticationSuccessHandler { - // default is 1 hour of inactivity, this is mostly for when we are using the mobile - // client, since entering data can take time, and data will be lost of the session - // times out while entering data. + /** + * Default is 1 hour of inactivity, this is mostly for when we are using the mobile + * client, since entering data can take time, and data will be lost if the session + * times out while entering data. + */ public static int DEFAULT_SESSION_TIMEOUT = 60 * 60; @Override - public void onAuthenticationSuccess( HttpServletRequest request, HttpServletResponse response, - Authentication authentication ) + public void onAuthenticationSuccess( HttpServletRequest request, HttpServletResponse response, Authentication authentication ) throws ServletException, IOException { HttpSession session = request.getSession(); === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/HttpRedirectFilter.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/HttpRedirectFilter.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/HttpRedirectFilter.java 2013-10-15 09:35:46 +0000 @@ -38,6 +38,9 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + /** * @author Torgeir Lorange Ostby * @version $Id: HttpRedirectFilter.java 2869 2007-02-20 14:26:09Z andegje $ @@ -47,6 +50,8 @@ { public static final String REDIRECT_PATH_KEY = "redirectPath"; + private static final Log log = LogFactory.getLog( HttpRedirectFilter.class ); + private String redirectPath; // ------------------------------------------------------------------------- @@ -62,14 +67,19 @@ public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain ) throws IOException, ServletException { + log.debug( "Redirecting to: " + redirectPath ); + HttpServletResponse httpResponse = (HttpServletResponse) response; if ( redirectPath == null ) { + String msg = "HttpRedirectFilter was not properly initialised. \"" + REDIRECT_PATH_KEY + "\" must be specified."; + httpResponse.setContentType( "text/plain" ); - httpResponse.getWriter().print( - "HttpRedirectFilter was not properly initialised. \"" + REDIRECT_PATH_KEY + "\" must be specified." ); + httpResponse.getWriter().print( msg ); + log.warn( msg ); + return; }