blob: 038be435993745a3cb27c8b151e2f25ed6a780b9 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<web-app version="3.0">
<display-name>Apache OFBiz - Solr Component</display-name>
<description>Solr Component of the Apache OFBiz Project</description>
<context-param>
<param-name>entityDelegatorName</param-name>
<param-value>default</param-value>
<!-- The Name of the Entity Delegator to use, defined in entityengine.xml -->
</context-param>
<context-param>
<param-name>localDispatcherName</param-name>
<param-value>solr</param-value>
<!-- A unique name used to identify/recognize the local dispatcher for the Service Engine -->
</context-param>
<context-param>
<param-name>mainDecoratorLocation</param-name>
<param-value>component://solr/widget/CommonScreens.xml</param-value>
<!-- The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files. -->
</context-param>
<context-param>
<param-name>partyDecoratorLocation</param-name>
<param-value>component://content/widget/CommonScreens.xml</param-value>
<!-- The location of the CommonPartyDecorator screen to use for this webapp; referred to as a context variable in screen def XML files. -->
</context-param>
<filter>
<filter-name>ControlFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ControlFilter</filter-class>
<init-param>
<param-name>allowedPaths</param-name>
<param-value>/control:/error:/css:/img:/js:/tpl:/favicon.ico:/admin:/admin.html:/#:/schema:/config:/:/solrdefault:/libs:/partials:/info:/logging:/level:/solr:/~logging:</param-value>
</init-param>
<init-param>
<param-name>redirectPath</param-name>
<param-value>/control/login</param-value>
</init-param>
</filter>
<filter>
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<filter-name>SolrFilter</filter-name>
<filter-class>org.apache.ofbiz.solr.webapp.OFBizSolrContextFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ContextFilter</filter-name>
<url-pattern>/control/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SolrFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class>
</listener>
<listener>
<listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class>
</listener>
<servlet>
<servlet-name>ControlServlet</servlet-name>
<!-- Main Control Servlet -->
<servlet-class>org.apache.ofbiz.webapp.control.ControlServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ControlServlet</servlet-name>
<url-pattern>/control/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Zookeeper</servlet-name>
<servlet-class>org.apache.solr.servlet.ZookeeperInfoServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>LoadAdminUI</servlet-name>
<servlet-class>org.apache.ofbiz.solr.webapp.OFBizSolrLoadAdminUiServlet</servlet-class>
<init-param>
<param-name>destination</param-name>
<param-value>${context}/#/</param-value>
</init-param>
</servlet>
<!-- Remove in Solr 5.0 -->
<!-- This sends SC_MOVED_PERMANENTLY (301) for resources that changed in 4.0 -->
<servlet>
<servlet-name>RedirectOldAdminUI</servlet-name>
<servlet-class>org.apache.ofbiz.solr.webapp.OFBizSolrRedirectServlet</servlet-class>
<init-param>
<param-name>destination</param-name>
<param-value>${context}/#/</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>RedirectOldZookeeper</servlet-name>
<servlet-class>org.apache.ofbiz.solr.webapp.OFBizSolrRedirectServlet</servlet-class>
<init-param>
<param-name>destination</param-name>
<param-value>${context}/zookeeper</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>RedirectLogging</servlet-name>
<servlet-class>org.apache.ofbiz.solr.webapp.OFBizSolrRedirectServlet</servlet-class>
<init-param>
<param-name>destination</param-name>
<param-value>${context}/#/~logging</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>SolrRestApi</servlet-name>
<servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class>
<init-param>
<param-name>org.restlet.application</param-name>
<param-value>org.apache.solr.rest.SolrSchemaRestApi</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>RedirectOldAdminUI</servlet-name>
<url-pattern>/admin/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RedirectOldAdminUI</servlet-name>
<url-pattern>/admin</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LoadAdminUI</servlet-name>
<url-pattern>/admin.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RedirectOldZookeeper</servlet-name>
<url-pattern>/zookeeper.jsp</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RedirectLogging</servlet-name>
<url-pattern>/logging</url-pattern>
</servlet-mapping>
<!-- Servlet Mapping -->
<servlet-mapping>
<servlet-name>Zookeeper</servlet-name>
<url-pattern>/zookeeper</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SolrRestApi</servlet-name>
<url-pattern>/schema/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>2</session-timeout>
<cookie-config>
<http-only>true</http-only>
<secure>true</secure>
</cookie-config>
<tracking-mode>COOKIE</tracking-mode>
</session-config>
<mime-mapping>
<extension>.xsl</extension>
<!-- per http://www.w3.org/TR/2006/PR-xslt20-20061121/ -->
<mime-type>application/xslt+xml</mime-type>
</mime-mapping>
<welcome-file-list>
<welcome-file>admin.html</welcome-file>
</welcome-file-list>
</web-app>