=== modified file 'dhis-2/dhis-web/dhis-web-api-mobile/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-api-mobile/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -39,7 +39,6 @@
Struts
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
-
encodingFilter
org.springframework.web.filter.CharacterEncodingFilter
@@ -52,6 +51,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -81,6 +84,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encoding-filter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
woff
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== added file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/AppCacheFilter.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/AppCacheFilter.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/AppCacheFilter.java 2015-02-26 08:12:03 +0000
@@ -0,0 +1,84 @@
+package org.hisp.dhis.servlet.filter;
+
+/*
+ * Copyright (c) 2004-2015, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.system.SystemInfo;
+import org.hisp.dhis.system.SystemService;
+import org.hisp.dhis.user.CurrentUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @author Morten Olav Hansen
+ */
+public class AppCacheFilter implements Filter
+{
+ @Autowired
+ private CurrentUserService currentUserService;
+
+ @Autowired
+ private SystemService systemService;
+
+ @Override
+ public void doFilter( ServletRequest req, ServletResponse res, FilterChain chain ) throws IOException, ServletException
+ {
+ if ( req != null && req instanceof HttpServletRequest && res != null && res instanceof HttpServletResponse )
+ {
+ HttpServletRequest request = (HttpServletRequest) req;
+ HttpServletResponse response = (HttpServletResponse) res;
+
+ chain.doFilter( request, response );
+
+ SystemInfo systemInfo = systemService.getSystemInfo();
+
+ response.getOutputStream().println( "# User: " + currentUserService.getCurrentUsername() );
+ response.getOutputStream().println( "# Revision: " + systemInfo.getRevision() );
+ response.getOutputStream().println( "# Calendar: " + systemInfo.getCalendar() );
+ }
+ }
+
+ @Override
+ public void init( FilterConfig filterConfig ) throws ServletException
+ {
+ }
+
+ @Override
+ public void destroy()
+ {
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2015-02-26 05:24:05 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2015-02-26 08:12:03 +0000
@@ -20,7 +20,9 @@
-
+
+
+
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -39,9 +39,7 @@
encoding-filter
-
- org.springframework.web.filter.CharacterEncodingFilter
-
+ org.springframework.web.filter.CharacterEncodingFilter
encoding
UTF-8
@@ -51,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encoding-filter
@@ -81,6 +83,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encodingFilter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -45,6 +45,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encoding-filter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-ohie/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encoding-filter
@@ -90,6 +94,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml 2014-10-31 11:41:15 +0000
+++ dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -55,6 +55,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encoding-filter
@@ -100,9 +104,12 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
-
org.springframework.web.context.ContextLoaderListener
@@ -111,7 +118,6 @@
-
webapi
org.springframework.web.servlet.DispatcherServlet
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encoding-filter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encoding-filter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/WEB-INF/web.xml 2014-10-20 06:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/WEB-INF/web.xml 2015-02-26 08:12:03 +0000
@@ -49,6 +49,10 @@
true
+
+ appCacheFilter
+ org.springframework.web.filter.DelegatingFilterProxy
+
encoding-filter
@@ -78,6 +82,10 @@
Struts
*.action
+
+ appCacheFilter
+ *.appcache
+
org.springframework.web.context.ContextLoaderListener