source: sandbox/expresso-solr/solr/example/work/jetty-0.0.0.0-8983-solr.war-_solr-any-/webapp/WEB-INF/web.xml @ 7588

Revision 7588, 6.0 KB checked in by adir, 11 years ago (diff)

Ticket #000 - Adicionando a integracao de buscas com Solr na base a ser isnerida na comunidade

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Licensed to the Apache Software Foundation (ASF) under one or more
4 contributor license agreements.  See the NOTICE file distributed with
5 this work for additional information regarding copyright ownership.
6 The ASF licenses this file to You under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with
8 the License.  You may obtain a copy of the License at
9
10     http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17-->
18<web-app xmlns="http://java.sun.com/xml/ns/javaee"
19         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
21         version="2.5"
22         metadata-complete="true"
23>
24
25
26  <!-- Uncomment if you are trying to use a Resin version before 3.0.19.
27    Their XML implementation isn't entirely compatible with Xerces.
28    Below are the implementations to use with Sun's JVM.
29  <system-property javax.xml.xpath.XPathFactory=
30             "com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl"/>
31  <system-property javax.xml.parsers.DocumentBuilderFactory=
32             "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/>
33  <system-property javax.xml.parsers.SAXParserFactory=
34             "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/>
35   -->
36
37  <!-- People who want to hardcode their "Solr Home" directly into the
38       WAR File can set the JNDI property here...
39   -->
40  <!--
41    <env-entry>
42       <env-entry-name>solr/home</env-entry-name>
43       <env-entry-value>/put/your/solr/home/here</env-entry-value>
44       <env-entry-type>java.lang.String</env-entry-type>
45    </env-entry>
46   -->
47   
48  <!-- Any path (name) registered in solrconfig.xml will be sent to that filter -->
49  <filter>
50    <filter-name>SolrRequestFilter</filter-name>
51    <filter-class>org.apache.solr.servlet.SolrDispatchFilter</filter-class>
52    <!-- If you are wiring Solr into a larger web application which controls
53         the web context root, you will probably want to mount Solr under
54         a path prefix (app.war with /app/solr mounted into it, for example).
55         You will need to put this prefix in front of the SolrDispatchFilter
56         url-pattern mapping too (/solr/*), and also on any paths for
57         legacy Solr servlet mappings you may be using.
58         For the Admin UI to work properly in a path-prefixed configuration,
59         the admin folder containing the resources needs to be under the app context root
60         named to match the path-prefix.  For example:
61
62            .war
63               xxx
64                 js
65                   main.js
66    -->
67    <!--
68    <init-param>
69      <param-name>path-prefix</param-name>
70      <param-value>/xxx</param-value>
71    </init-param>
72    -->
73  </filter>
74
75  <filter-mapping>
76    <!--
77      NOTE: When using multicore, /admin JSP URLs with a core specified
78      such as /solr/coreName/admin/stats.jsp get forwarded by a
79      RequestDispatcher to /solr/admin/stats.jsp with the specified core
80      put into request scope keyed as "org.apache.solr.SolrCore".
81
82      It is unnecessary, and potentially problematic, to have the SolrDispatchFilter
83      configured to also filter on forwards.  Do not configure
84      this dispatcher as <dispatcher>FORWARD</dispatcher>.
85    -->
86    <filter-name>SolrRequestFilter</filter-name>
87    <url-pattern>/*</url-pattern>
88  </filter-mapping>
89
90  <servlet>
91    <servlet-name>Zookeeper</servlet-name>
92    <servlet-class>org.apache.solr.servlet.ZookeeperInfoServlet</servlet-class>
93  </servlet>
94 
95  <servlet>
96    <servlet-name>LoadAdminUI</servlet-name>
97    <servlet-class>org.apache.solr.servlet.LoadAdminUiServlet</servlet-class>
98  </servlet>
99 
100  <!-- Remove in Solr 5.0 -->
101  <!-- This sends SC_MOVED_PERMANENTLY (301) for resources that changed in 4.0 -->
102  <servlet>
103    <servlet-name>RedirectOldAdminUI</servlet-name>
104    <servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class>
105    <init-param>
106      <param-name>destination</param-name>
107      <param-value>${context}/#/</param-value>
108    </init-param>
109  </servlet>
110 
111  <servlet>
112    <servlet-name>RedirectOldZookeeper</servlet-name>
113    <servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class>
114    <init-param>
115      <param-name>destination</param-name>
116      <param-value>${context}/zookeeper</param-value>
117    </init-param>
118  </servlet>
119 
120  <servlet>
121    <servlet-name>RedirectLogging</servlet-name>
122    <servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class>
123    <init-param>
124      <param-name>destination</param-name>
125      <param-value>${context}/#/~logging</param-value>
126    </init-param>
127  </servlet>
128 
129  <servlet-mapping>
130    <servlet-name>RedirectOldAdminUI</servlet-name>
131    <url-pattern>/admin/</url-pattern>
132  </servlet-mapping>
133  <servlet-mapping>
134    <servlet-name>RedirectOldAdminUI</servlet-name>
135    <url-pattern>/admin</url-pattern>
136  </servlet-mapping>
137  <servlet-mapping>
138    <servlet-name>RedirectOldZookeeper</servlet-name>
139    <url-pattern>/zookeeper.jsp</url-pattern>
140  </servlet-mapping>
141  <servlet-mapping>
142    <servlet-name>RedirectLogging</servlet-name>
143    <url-pattern>/logging</url-pattern>
144  </servlet-mapping>
145
146  <!-- Servlet Mapping -->
147  <servlet-mapping>
148    <servlet-name>Zookeeper</servlet-name>
149    <url-pattern>/zookeeper</url-pattern>
150  </servlet-mapping>
151 
152  <servlet-mapping>
153    <servlet-name>LoadAdminUI</servlet-name>
154    <url-pattern>/admin.html</url-pattern>
155  </servlet-mapping>
156 
157  <mime-mapping>
158    <extension>.xsl</extension>
159    <!-- per http://www.w3.org/TR/2006/PR-xslt20-20061121/ -->
160    <mime-type>application/xslt+xml</mime-type>
161  </mime-mapping>
162
163  <welcome-file-list>
164    <welcome-file>admin.html</welcome-file>
165  </welcome-file-list>
166
167</web-app>
Note: See TracBrowser for help on using the repository browser.