From 3c3c833897dbfc0e85feaf36086a505f990ecb76 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Thu, 20 Jul 2017 01:29:49 +0300 Subject: [SDC] 1710 rebase + pom modifications Change-Id: I1f9c0a5201576c7a6b124f6a786db12c1a8cd7c0 Signed-off-by: Michael Lando --- catalog-fe/pom.xml | 59 ---------------------- .../main/java/org/openecomp/sdc/fe/GzipFilter.java | 40 +++++++++++++++ catalog-fe/src/main/webapp/WEB-INF/web.xml | 11 ++++ 3 files changed, 51 insertions(+), 59 deletions(-) create mode 100644 catalog-fe/src/main/java/org/openecomp/sdc/fe/GzipFilter.java (limited to 'catalog-fe') diff --git a/catalog-fe/pom.xml b/catalog-fe/pom.xml index 4883978261..155b14c486 100644 --- a/catalog-fe/pom.xml +++ b/catalog-fe/pom.xml @@ -446,64 +446,5 @@ ${project.artifactId}-${project.version} - - - build - - false - - - - ${project.artifactId}-${full.release.version} - - - - - - - org.codehaus.mojo - properties-maven-plugin - 1.0-alpha-2 - - - - false - initialize - - read-project-properties - - - - ${project.parent.build.directory}/FullReleaseVersion.properties - - - - - - - - - - - Fortify - - false - - - - - - com.fortify.ps.maven.plugin - sca-maven-plugin - 4.30 - - 1.8 - ${project.parent.artifactId} - ${project.parent.artifactId} - - - - - diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/GzipFilter.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/GzipFilter.java new file mode 100644 index 0000000000..884e688503 --- /dev/null +++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/GzipFilter.java @@ -0,0 +1,40 @@ +package org.openecomp.sdc.fe; + +import java.io.IOException; + +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.HttpServletResponse; + +public class GzipFilter implements Filter { + + @Override + public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) + throws IOException, + ServletException { + + + final HttpServletResponse httpResponse = (HttpServletResponse) response; + + + httpResponse.setHeader("Content-Encoding", "gzip"); + httpResponse.setHeader("Content-Type", "application/javascript"); + chain.doFilter(request, response); + } + + @Override + public void init(FilterConfig filterConfig) throws ServletException { + // TODO Auto-generated method stub + + } + + @Override + public void destroy() { + // TODO Auto-generated method stub + + } +} \ No newline at end of file diff --git a/catalog-fe/src/main/webapp/WEB-INF/web.xml b/catalog-fe/src/main/webapp/WEB-INF/web.xml index 9c81055652..725c041c51 100644 --- a/catalog-fe/src/main/webapp/WEB-INF/web.xml +++ b/catalog-fe/src/main/webapp/WEB-INF/web.xml @@ -105,6 +105,17 @@ + + + gzipFilter + org.openecomp.sdc.fe.GzipFilter + + + + gzipFilter + *.jsgz + + org.openecomp.sdc.fe.listen.FEAppContextListener -- cgit 1.2.3-korg