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 | <!--
|
---|
53 | Exclude patterns is a list of directories that would be short circuited by the
|
---|
54 | SolrDispatchFilter. It includes all Admin UI related static content.
|
---|
55 | NOTE: It is NOT a pattern but only matches the start of the HTTP ServletPath.
|
---|
56 | -->
|
---|
57 | <init-param>
|
---|
58 | <param-name>excludePatterns</param-name>
|
---|
59 | <param-value>/partials/.+,/libs/.+,/css/.+,/js/.+,/img/.+,/tpl/.+</param-value>
|
---|
60 | </init-param>
|
---|
61 | </filter>
|
---|
62 |
|
---|
63 | <filter-mapping>
|
---|
64 | <!--
|
---|
65 | NOTE: When using multicore, /admin JSP URLs with a core specified
|
---|
66 | such as /solr/coreName/admin/stats.jsp get forwarded by a
|
---|
67 | RequestDispatcher to /solr/admin/stats.jsp with the specified core
|
---|
68 | put into request scope keyed as "org.apache.solr.SolrCore".
|
---|
69 |
|
---|
70 | It is unnecessary, and potentially problematic, to have the SolrDispatchFilter
|
---|
71 | configured to also filter on forwards. Do not configure
|
---|
72 | this dispatcher as <dispatcher>FORWARD</dispatcher>.
|
---|
73 | -->
|
---|
74 | <filter-name>SolrRequestFilter</filter-name>
|
---|
75 | <url-pattern>/*</url-pattern>
|
---|
76 | </filter-mapping>
|
---|
77 |
|
---|
78 | <servlet>
|
---|
79 | <servlet-name>LoadAdminUI</servlet-name>
|
---|
80 | <servlet-class>org.apache.solr.servlet.LoadAdminUiServlet</servlet-class>
|
---|
81 | </servlet>
|
---|
82 |
|
---|
83 | <!-- Remove in Solr 5.0 -->
|
---|
84 | <!-- This sends SC_MOVED_PERMANENTLY (301) for resources that changed in 4.0 -->
|
---|
85 | <servlet>
|
---|
86 | <servlet-name>RedirectOldAdminUI</servlet-name>
|
---|
87 | <servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class>
|
---|
88 | <init-param>
|
---|
89 | <param-name>destination</param-name>
|
---|
90 | <param-value>${context}/#/</param-value>
|
---|
91 | </init-param>
|
---|
92 | </servlet>
|
---|
93 |
|
---|
94 | <servlet>
|
---|
95 | <servlet-name>RedirectOldZookeeper</servlet-name>
|
---|
96 | <servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class>
|
---|
97 | <init-param>
|
---|
98 | <param-name>destination</param-name>
|
---|
99 | <param-value>${context}/admin/zookeeper</param-value>
|
---|
100 | </init-param>
|
---|
101 | </servlet>
|
---|
102 |
|
---|
103 | <servlet>
|
---|
104 | <servlet-name>RedirectLogging</servlet-name>
|
---|
105 | <servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class>
|
---|
106 | <init-param>
|
---|
107 | <param-name>destination</param-name>
|
---|
108 | <param-value>${context}/#/~logging</param-value>
|
---|
109 | </init-param>
|
---|
110 | </servlet>
|
---|
111 |
|
---|
112 | <servlet>
|
---|
113 | <servlet-name>SolrRestApi</servlet-name>
|
---|
114 | <servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class>
|
---|
115 | <init-param>
|
---|
116 | <param-name>org.restlet.application</param-name>
|
---|
117 | <param-value>org.apache.solr.rest.SolrSchemaRestApi</param-value>
|
---|
118 | </init-param>
|
---|
119 | </servlet>
|
---|
120 |
|
---|
121 | <servlet-mapping>
|
---|
122 | <servlet-name>RedirectOldAdminUI</servlet-name>
|
---|
123 | <url-pattern>/admin/</url-pattern>
|
---|
124 | </servlet-mapping>
|
---|
125 | <servlet-mapping>
|
---|
126 | <servlet-name>RedirectOldAdminUI</servlet-name>
|
---|
127 | <url-pattern>/admin</url-pattern>
|
---|
128 | </servlet-mapping>
|
---|
129 | <servlet-mapping>
|
---|
130 | <servlet-name>RedirectOldZookeeper</servlet-name>
|
---|
131 | <url-pattern>/zookeeper.jsp</url-pattern>
|
---|
132 | </servlet-mapping>
|
---|
133 | <servlet-mapping>
|
---|
134 | <servlet-name>RedirectOldZookeeper</servlet-name>
|
---|
135 | <url-pattern>/zookeeper</url-pattern>
|
---|
136 | </servlet-mapping>
|
---|
137 | <servlet-mapping>
|
---|
138 | <servlet-name>RedirectLogging</servlet-name>
|
---|
139 | <url-pattern>/logging</url-pattern>
|
---|
140 | </servlet-mapping>
|
---|
141 |
|
---|
142 | <servlet-mapping>
|
---|
143 | <servlet-name>LoadAdminUI</servlet-name>
|
---|
144 | <url-pattern>/index.html</url-pattern>
|
---|
145 | </servlet-mapping>
|
---|
146 |
|
---|
147 | <servlet-mapping>
|
---|
148 | <servlet-name>SolrRestApi</servlet-name>
|
---|
149 | <url-pattern>/schema/*</url-pattern>
|
---|
150 | </servlet-mapping>
|
---|
151 |
|
---|
152 | <mime-mapping>
|
---|
153 | <extension>.xsl</extension>
|
---|
154 | <!-- per http://www.w3.org/TR/2006/PR-xslt20-20061121/ -->
|
---|
155 | <mime-type>application/xslt+xml</mime-type>
|
---|
156 | </mime-mapping>
|
---|
157 |
|
---|
158 | <welcome-file-list>
|
---|
159 | <welcome-file>index.html</welcome-file>
|
---|
160 | </welcome-file-list>
|
---|
161 |
|
---|
162 | <!-- Get rid of error message -->
|
---|
163 | <security-constraint>
|
---|
164 | <web-resource-collection>
|
---|
165 | <web-resource-name>Disable TRACE</web-resource-name>
|
---|
166 | <url-pattern>/</url-pattern>
|
---|
167 | <http-method>TRACE</http-method>
|
---|
168 | </web-resource-collection>
|
---|
169 | <auth-constraint/>
|
---|
170 | </security-constraint>
|
---|
171 | <security-constraint>
|
---|
172 | <web-resource-collection>
|
---|
173 | <web-resource-name>Enable everything but TRACE</web-resource-name>
|
---|
174 | <url-pattern>/</url-pattern>
|
---|
175 | <http-method-omission>TRACE</http-method-omission>
|
---|
176 | </web-resource-collection>
|
---|
177 | </security-constraint>
|
---|
178 |
|
---|
179 | </web-app>
|
---|