protected void configureWebAppServlets() { // Add in the web services filters/serves if app has them. // Using Jersey/guice integration module. If user has web services // they must have also bound a default one in their webapp code. if (this.wsName != null) { // There seems to be an issue with the guice/jersey integration // where we have to list the stuff we don't want it to serve // through the guicecontainer. In this case its everything except // the the web services api prefix. We can't just change the filter // from /* below - that doesn't work. String regex = "(?!/" + this.wsName + ")"; serveRegex(regex).with(DefaultWrapperServlet.class); Map<String, String> params = new HashMap<String, String>(); params.put(ResourceConfig.FEATURE_IMPLICIT_VIEWABLES, "true"); params.put(ServletContainer.FEATURE_FILTER_FORWARD_ON_404, "true"); params.put(FeaturesAndProperties.FEATURE_XMLROOTELEMENT_PROCESSING, "true"); params.put(ResourceConfig.PROPERTY_CONTAINER_REQUEST_FILTERS, GZIPContentEncodingFilter.class.getName()); params.put(ResourceConfig.PROPERTY_CONTAINER_RESPONSE_FILTERS, GZIPContentEncodingFilter.class.getName()); filter("/*").through(getWebAppFilterClass(), params); } }
protected void configureWebAppServlets() { // Add in the web services filters/serves if app has them. // Using Jersey/guice integration module. If user has web services // they must have also bound a default one in their webapp code. if (this.wsName != null) { // There seems to be an issue with the guice/jersey integration // where we have to list the stuff we don't want it to serve // through the guicecontainer. In this case its everything except // the the web services api prefix. We can't just change the filter // from /* below - that doesn't work. String regex = "(?!/" + this.wsName + ")"; serveRegex(regex).with(DefaultWrapperServlet.class); Map<String, String> params = new HashMap<String, String>(); params.put(ResourceConfig.FEATURE_IMPLICIT_VIEWABLES, "true"); params.put(ServletContainer.FEATURE_FILTER_FORWARD_ON_404, "true"); params.put(FeaturesAndProperties.FEATURE_XMLROOTELEMENT_PROCESSING, "true"); params.put(ResourceConfig.PROPERTY_CONTAINER_REQUEST_FILTERS, GZIPContentEncodingFilter.class.getName()); params.put(ResourceConfig.PROPERTY_CONTAINER_RESPONSE_FILTERS, GZIPContentEncodingFilter.class.getName()); filter("/*").through(getWebAppFilterClass(), params); } }
protected void configureWebAppServlets() { // Add in the web services filters/serves if app has them. // Using Jersey/guice integration module. If user has web services // they must have also bound a default one in their webapp code. if (this.wsName != null) { // There seems to be an issue with the guice/jersey integration // where we have to list the stuff we don't want it to serve // through the guicecontainer. In this case its everything except // the the web services api prefix. We can't just change the filter // from /* below - that doesn't work. String regex = "(?!/" + this.wsName + ")"; serveRegex(regex).with(DefaultWrapperServlet.class); Map<String, String> params = new HashMap<String, String>(); params.put(ResourceConfig.FEATURE_IMPLICIT_VIEWABLES, "true"); params.put(ServletContainer.FEATURE_FILTER_FORWARD_ON_404, "true"); params.put(FeaturesAndProperties.FEATURE_XMLROOTELEMENT_PROCESSING, "true"); params.put(ResourceConfig.PROPERTY_CONTAINER_REQUEST_FILTERS, GZIPContentEncodingFilter.class.getName()); params.put(ResourceConfig.PROPERTY_CONTAINER_RESPONSE_FILTERS, GZIPContentEncodingFilter.class.getName()); filter("/*").through(getWebAppFilterClass(), params); } }