web.xml template for geonetwork 3.2.
This commit is contained in:
parent
e8ea58a517
commit
0031539098
|
@ -0,0 +1,452 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ Copyright (C) 2001-2016 Food and Agriculture Organization of the
|
||||||
|
~ United Nations (FAO-UN), United Nations World Food Programme (WFP)
|
||||||
|
~ and United Nations Environment Programme (UNEP)
|
||||||
|
~
|
||||||
|
~ This program is free software; you can redistribute it and/or modify
|
||||||
|
~ it under the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation; either version 2 of the License, or (at
|
||||||
|
~ your option) any later version.
|
||||||
|
~
|
||||||
|
~ This program is distributed in the hope that it will be useful, but
|
||||||
|
~ WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
~ General Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU General Public License
|
||||||
|
~ along with this program; if not, write to the Free Software
|
||||||
|
~ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
~
|
||||||
|
~ Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
|
||||||
|
~ Rome - Italy. email: geonetwork@osgeo.org
|
||||||
|
-->
|
||||||
|
|
||||||
|
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||||
|
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||||
|
version="2.5"
|
||||||
|
metadata-complete="true">
|
||||||
|
|
||||||
|
<display-name>geonetwork</display-name>
|
||||||
|
<listener>
|
||||||
|
<listener-class>jeeves.config.springutil.JeevesContextLoaderListener</listener-class>
|
||||||
|
</listener>
|
||||||
|
<listener>
|
||||||
|
<listener-class>
|
||||||
|
org.springframework.web.context.request.RequestContextListener
|
||||||
|
</listener-class>
|
||||||
|
</listener>
|
||||||
|
|
||||||
|
<!-- shut down java cache used for xlinks and spatial index -->
|
||||||
|
<listener>
|
||||||
|
<listener-class>
|
||||||
|
org.apache.jcs.utils.servlet.JCSServletContextListener
|
||||||
|
</listener-class>
|
||||||
|
</listener>
|
||||||
|
<filter>
|
||||||
|
<filter-name>characterEncodingFilter</filter-name>
|
||||||
|
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>encoding</param-name>
|
||||||
|
<param-value>UTF-8</param-value>
|
||||||
|
</init-param>
|
||||||
|
</filter>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>characterEncodingFilter</filter-name>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<listener>
|
||||||
|
<listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
|
||||||
|
</listener>
|
||||||
|
|
||||||
|
{% if gcube_geonetwork_connector_install is defined and gcube_geonetwork_connector_install %}
|
||||||
|
<filter>
|
||||||
|
<filter-name>gcubeAuthenticationFilter</filter-name>
|
||||||
|
<filter-class>org.gcube.data.access.connector.GeoNetworkFilter</filter-class>
|
||||||
|
</filter>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>gcubeAuthenticationFilter</filter-name>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- Spring security -->
|
||||||
|
<!-- <filter>
|
||||||
|
<filter-name>springSecurityFilterChain</filter-name>
|
||||||
|
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
|
||||||
|
</filter> -->
|
||||||
|
<filter>
|
||||||
|
<filter-name>springSecurityFilterChain</filter-name>
|
||||||
|
<filter-class>jeeves.config.springutil.JeevesDelegatingFilterProxy</filter-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>loginService</param-name>
|
||||||
|
<param-value>signin</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>trustedHost</param-name>
|
||||||
|
<param-value>localhost</param-value>
|
||||||
|
</init-param>
|
||||||
|
</filter>
|
||||||
|
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>springSecurityFilterChain</filter-name>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<filter-name>SessionTimeoutCookieFilter</filter-name>
|
||||||
|
<filter-class>org.geonetwork.http.SessionTimeoutCookieFilter</filter-class>
|
||||||
|
</filter>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>SessionTimeoutCookieFilter</filter-name>
|
||||||
|
<url-pattern>/srv/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<!-- url rewrite filter -->
|
||||||
|
<filter>
|
||||||
|
<filter-name>UrlRewriteFilter</filter-name>
|
||||||
|
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
|
||||||
|
<!-- set the amount of seconds the conf file will be checked for reload. can be a valid integer (0 denotes
|
||||||
|
check every time, empty/not set denotes no reload check) -->
|
||||||
|
<!--<init-param>-->
|
||||||
|
<!--<param-name>confReloadCheckInterval</param-name>-->
|
||||||
|
<!--<param-value>0</param-value>-->
|
||||||
|
<!--</init-param>-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- sets up log level (will be logged to context log). Can be: TRACE, DEBUG, INFO (default), WARN, ERROR,
|
||||||
|
FATAL, log4j, commons, sysout:{level} (ie, sysout:DEBUG). If you are having trouble using normal levels use
|
||||||
|
sysout:DEBUG -->
|
||||||
|
<init-param>
|
||||||
|
<param-name>logLevel</param-name>
|
||||||
|
<param-value>WARN</param-value>
|
||||||
|
</init-param>
|
||||||
|
|
||||||
|
<!-- you can disable status page if desired. Can be: true, false (default true) -->
|
||||||
|
<init-param>
|
||||||
|
<param-name>statusEnabled</param-name>
|
||||||
|
<param-value>true</param-value>
|
||||||
|
</init-param>
|
||||||
|
|
||||||
|
<!-- you can change status path so that it does not conflict with your installed apps (note: defaults to
|
||||||
|
/rewrite-status). Note: must start with / -->
|
||||||
|
<init-param>
|
||||||
|
<param-name>statusPath</param-name>
|
||||||
|
<param-value>/rewritestatus</param-value>
|
||||||
|
</init-param>
|
||||||
|
</filter>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>UrlRewriteFilter</filter-name>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
<dispatcher>REQUEST</dispatcher>
|
||||||
|
<dispatcher>FORWARD</dispatcher>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<!-- Resources servlet -->
|
||||||
|
<filter>
|
||||||
|
<filter-name>resources</filter-name>
|
||||||
|
<filter-class>org.fao.geonet.resources.ResourceFilter</filter-class>
|
||||||
|
<!-- Specified what overrides to use if the
|
||||||
|
(servlet.getServletContext().getServletContextName()).jeeves.configuration.overrides.file
|
||||||
|
system parameter is not specified.
|
||||||
|
-->
|
||||||
|
<init-param>
|
||||||
|
<param-name>jeeves.configuration.overrides.file</param-name>
|
||||||
|
<param-value>,/WEB-INF/config-overrides-prod.xml</param-value>
|
||||||
|
</init-param>
|
||||||
|
</filter>
|
||||||
|
<!-- Add CORS Header -->
|
||||||
|
<filter>
|
||||||
|
<filter-name>cors</filter-name>
|
||||||
|
<filter-class>org.fao.geonet.web.CORSResponseFilter</filter-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>allowedHosts</param-name>
|
||||||
|
<param-value>*</param-value>
|
||||||
|
</init-param>
|
||||||
|
</filter>
|
||||||
|
<filter>
|
||||||
|
<!--
|
||||||
|
WebResourceOptimizer is a WRO4J Filter (https://code.google.com/p/wro4j/wiki/Introduction)
|
||||||
|
which runs css and javascript linting, compiling, minification and compression. We use it in two ways.
|
||||||
|
|
||||||
|
* Runtime as a Servlet Filter - at runtime WRO4J compiles, lints, minifies and compresses all javascript and css files.
|
||||||
|
This allows a developer to be able to get instant feed back when he/she changes a file.
|
||||||
|
By Default the javascript and css is minimized. To not have it minized use ?minimize=false
|
||||||
|
* Maven build - The same configuration is run on all javascript files during build time. The artifacts are ignored
|
||||||
|
because they are generated at runtime but it a check to verify that when deployed all artifacts can be
|
||||||
|
correctly built when the .
|
||||||
|
-->
|
||||||
|
|
||||||
|
<filter-name>WebResourceOptimizer</filter-name>
|
||||||
|
<filter-class>
|
||||||
|
org.fao.geonet.wro4j.GeonetWro4jFilter
|
||||||
|
</filter-class>
|
||||||
|
</filter>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>WebResourceOptimizer</filter-name>
|
||||||
|
<url-pattern>/static/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<!-- Only allow administrators or localhost access to the monitoring metrics -->
|
||||||
|
<filter>
|
||||||
|
<filter-name>MetricsRegistryInitializerFilter</filter-name>
|
||||||
|
<filter-class>org.fao.geonet.monitor.webapp.MetricsRegistryInitializerFilter</filter-class>
|
||||||
|
</filter>
|
||||||
|
|
||||||
|
<!-- Monitors the number of Active requests, request length and return codes -->
|
||||||
|
<filter>
|
||||||
|
<filter-name>webappMetricsFilter</filter-name>
|
||||||
|
<filter-class>org.fao.geonet.monitor.webapp.DefaultWebappMetricsFilter</filter-class>
|
||||||
|
</filter>
|
||||||
|
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>MetricsRegistryInitializerFilter</filter-name>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>webappMetricsFilter</filter-name>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>resources</filter-name>
|
||||||
|
<url-pattern>/images/logos/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>resources</filter-name>
|
||||||
|
<url-pattern>/images/harvesting/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>resources</filter-name>
|
||||||
|
<url-pattern>/xml/schemas/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>resources</filter-name>
|
||||||
|
<url-pattern>/images/statTmp/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>resources</filter-name>
|
||||||
|
<url-pattern>/htmlcache/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>resources</filter-name>
|
||||||
|
<url-pattern>/map/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>cors</filter-name>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
<!-- Print servlet -->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>mapfish.print</servlet-name>
|
||||||
|
<servlet-class>org.mapfish.print.servlet.MapPrinterServlet</servlet-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>config</param-name>
|
||||||
|
<param-value>WEB-INF/config-print/print-config.yaml</param-value>
|
||||||
|
</init-param>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>mapfish.print</servlet-name>
|
||||||
|
<url-pattern>/pdf/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!-- Convenience servlet for linking to various webapps for accessing monitoring data
|
||||||
|
Contains 4 sub mappings:
|
||||||
|
/metrics?[pretty=(true|false)][class=metric.name] - returns a json response with all of the registered metrics
|
||||||
|
/threads - returns a text representation of the stack dump at the moment of the call
|
||||||
|
/healthcheck - returns 200 if all checks pass or 500 Internal Service Error if one fails (and human readable response of the failures)
|
||||||
|
-->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>monitor</servlet-name>
|
||||||
|
<servlet-class>com.yammer.metrics.reporting.AdminServlet</servlet-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>SHOW_JVM_METRICS</param-name>
|
||||||
|
<param-value>true</param-value>
|
||||||
|
</init-param>
|
||||||
|
</servlet>
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>criticalHealthChecks</servlet-name>
|
||||||
|
<servlet-class>org.fao.geonet.monitor.webapp.GeonetworkHealthCheckServlet</servlet-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>REGISTRY_ATTRIBUTE_KEY</param-name>
|
||||||
|
<param-value>com.yammer.metrics.reporting.HealthCheckServlet.registry.critical</param-value>
|
||||||
|
</init-param>
|
||||||
|
</servlet>
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>warningHealthChecks</servlet-name>
|
||||||
|
<servlet-class>org.fao.geonet.monitor.webapp.GeonetworkHealthCheckServlet</servlet-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>REGISTRY_ATTRIBUTE_KEY</param-name>
|
||||||
|
<param-value>com.yammer.metrics.reporting.HealthCheckServlet.registry.warning</param-value>
|
||||||
|
</init-param>
|
||||||
|
</servlet>
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>expensiveHealthChecks</servlet-name>
|
||||||
|
<servlet-class>org.fao.geonet.monitor.webapp.GeonetworkHealthCheckServlet</servlet-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>REGISTRY_ATTRIBUTE_KEY</param-name>
|
||||||
|
<param-value>com.yammer.metrics.reporting.HealthCheckServlet.registry.expensive</param-value>
|
||||||
|
</init-param>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>monitor</servlet-name>
|
||||||
|
<url-pattern>/monitor/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>criticalHealthChecks</servlet-name>
|
||||||
|
<url-pattern>/criticalhealthcheck</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>warningHealthChecks</servlet-name>
|
||||||
|
<url-pattern>/warninghealthcheck</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>expensiveHealthChecks</servlet-name>
|
||||||
|
<url-pattern>/expensivehealthcheck</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>gn-servlet</servlet-name>
|
||||||
|
<servlet-class>jeeves.server.sources.http.JeevesServlet</servlet-class>
|
||||||
|
<!-- Specified what overrides to use if the
|
||||||
|
(servlet.getServletContext().getServletContextName()).jeeves.configuration.overrides.file
|
||||||
|
system parameter is not specified.
|
||||||
|
-->
|
||||||
|
<init-param>
|
||||||
|
<param-name>jeeves.configuration.overrides.file</param-name>
|
||||||
|
<param-value>,/WEB-INF/config-overrides-prod.xml</param-value>
|
||||||
|
</init-param>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Specified what geonetwork data directory to use.
|
||||||
|
<init-param>
|
||||||
|
<param-name>geonetwork.dir</param-name>
|
||||||
|
<param-value>/app/geonetwork_data_dir</param-value>
|
||||||
|
</init-param>-->
|
||||||
|
<load-on-startup>1</load-on-startup>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>gn-servlet</servlet-name>
|
||||||
|
<url-pattern>/nouse/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Multinode configuration: Add servlet mapping for each nodes
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>gn-servlet</servlet-name>
|
||||||
|
<url-pattern>/node1/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
-->
|
||||||
|
<!-- Servlet proxy -->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>HttpProxy</servlet-name>
|
||||||
|
<servlet-class>org.geonetwork.http.proxy.HttpProxyServlet</servlet-class>
|
||||||
|
|
||||||
|
<!-- List of allowed content types -->
|
||||||
|
<init-param>
|
||||||
|
<param-name>AllowedContentTypes</param-name>
|
||||||
|
<param-value>
|
||||||
|
application/xml,text/xml,
|
||||||
|
text/html,
|
||||||
|
text/plain,
|
||||||
|
image/png,
|
||||||
|
application/vnd.ogc.se_xml,
|
||||||
|
application/vnd.ogc.se+xml,
|
||||||
|
application/vnd.ogc.success+xml,
|
||||||
|
application/vnd.ogc.wms_xml,
|
||||||
|
application/vnd.ogc.context+xml,
|
||||||
|
application/vnd.ogc.gml,
|
||||||
|
application/vnd.ogc.sld+xml,
|
||||||
|
application/vnd.google-earth.kml+xml,
|
||||||
|
application/vnd.google-earth.kmz,
|
||||||
|
application/json
|
||||||
|
</param-value>
|
||||||
|
</init-param>
|
||||||
|
|
||||||
|
<!-- List of host allowed to be accessed by the proxy: If not specified or empty, any hosts is allowed -->
|
||||||
|
<init-param>
|
||||||
|
<param-name>AllowedHosts</param-name>
|
||||||
|
<param-value/>
|
||||||
|
</init-param>
|
||||||
|
|
||||||
|
<!-- Default proxy url if none is provided -->
|
||||||
|
<init-param>
|
||||||
|
<param-name>DefaultProxyUrl</param-name>
|
||||||
|
<param-value>http://www.openlayers.org</param-value>
|
||||||
|
</init-param>
|
||||||
|
|
||||||
|
<load-on-startup>0</load-on-startup>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<!-- Spring dispatcher servlet -->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>spring</servlet-name>
|
||||||
|
<servlet-class>
|
||||||
|
jeeves.config.springutil.JeevesDispatcherServlet
|
||||||
|
</servlet-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>nodeId</param-name>
|
||||||
|
<param-value>srv</param-value>
|
||||||
|
</init-param>
|
||||||
|
<load-on-startup>2</load-on-startup>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>spring</servlet-name>
|
||||||
|
<url-pattern>/srv/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>spring</servlet-name>
|
||||||
|
<url-pattern>/home</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>spring</servlet-name>
|
||||||
|
<url-pattern>/login.jsp</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>spring</servlet-name>
|
||||||
|
<url-pattern>/accessDenied.jsp</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>HttpProxy</servlet-name>
|
||||||
|
<url-pattern>/proxy</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!-- Web map context servlet -->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>wmc</servlet-name>
|
||||||
|
<servlet-class>org.geonetwork.map.wmc.WmcServlet</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>wmc</servlet-name>
|
||||||
|
<url-pattern>/wmc/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<welcome-file-list>
|
||||||
|
<welcome-file>home</welcome-file>
|
||||||
|
<welcome-file>index.html</welcome-file>
|
||||||
|
</welcome-file-list>
|
||||||
|
|
||||||
|
<session-config>
|
||||||
|
<session-timeout>35</session-timeout>
|
||||||
|
</session-config>
|
||||||
|
</web-app>
|
Loading…
Reference in New Issue