mirror of https://github.com/apache/lucene.git
Clarify path-prefix in web.xml comments and javadocs
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@640654 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5e04a269e6
commit
01b7029218
|
@ -358,8 +358,9 @@ public class SolrDispatchFilter implements Filter
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set the prefix for all paths. This is useful if you want to apply the
|
* Set the prefix for all paths. This is useful if you want to apply the
|
||||||
* filter to something other then *.
|
* filter to something other then /*, perhaps because you are merging this
|
||||||
|
* filter into a larger web application.
|
||||||
*
|
*
|
||||||
* For example, if web.xml specifies:
|
* For example, if web.xml specifies:
|
||||||
*
|
*
|
||||||
|
@ -369,7 +370,7 @@ public class SolrDispatchFilter implements Filter
|
||||||
* </filter-mapping>
|
* </filter-mapping>
|
||||||
*
|
*
|
||||||
* Make sure to set the PathPrefix to "/xxx" either with this function
|
* Make sure to set the PathPrefix to "/xxx" either with this function
|
||||||
* or in web.xml
|
* or in web.xml.
|
||||||
*
|
*
|
||||||
* <init-param>
|
* <init-param>
|
||||||
* <param-name>path-prefix</param-name>
|
* <param-name>path-prefix</param-name>
|
||||||
|
|
|
@ -34,14 +34,30 @@
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>SolrRequestFilter</filter-name>
|
<filter-name>SolrRequestFilter</filter-name>
|
||||||
<filter-class>org.apache.solr.servlet.SolrDispatchFilter</filter-class>
|
<filter-class>org.apache.solr.servlet.SolrDispatchFilter</filter-class>
|
||||||
<!--
|
<!-- If you are wiring Solr into a larger web application which controls
|
||||||
|
the web context root, you will probably want to mount Solr under
|
||||||
|
a path prefix (app.war with /app/solr mounted into it, for example).
|
||||||
|
You will need to put this prefix in front of the SolrDispatchFilter
|
||||||
|
url-pattern mapping too (/solr/*), and also on any paths for
|
||||||
|
legacy Solr servlet mappings you may be using.
|
||||||
<init-param>
|
<init-param>
|
||||||
<param-name>path-prefix</param-name>
|
<param-name>path-prefix</param-name>
|
||||||
<param-value>/xxx</param-value>
|
<param-value>/xxx</param-value>
|
||||||
</init-param>
|
</init-param>
|
||||||
-->
|
-->
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
|
<!--
|
||||||
|
NOTE: When using multicore, /admin JSP URLs with a core specified
|
||||||
|
such as /solr/coreName/admin/stats.jsp get forwarded by a
|
||||||
|
RequestDispatcher to /solr/admin/stats.jsp with the specified core
|
||||||
|
put into request scope keyed as "org.apache.solr.SolrCore".
|
||||||
|
|
||||||
|
It is unnecessary, and potentially problematic, to have the SolrDispatchFilter
|
||||||
|
configured to also filter on forwards. Do not configure
|
||||||
|
this dispatcher as <dispatcher>FORWARD</dispatcher>.
|
||||||
|
-->
|
||||||
<filter-name>SolrRequestFilter</filter-name>
|
<filter-name>SolrRequestFilter</filter-name>
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
Loading…
Reference in New Issue