lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r640654 - in /lucene/solr/trunk/src/webapp: src/org/apache/solr/servlet/SolrDispatchFilter.java web/WEB-INF/web.xml
Date Tue, 25 Mar 2008 00:42:41 GMT
Author: ehatcher
Date: Mon Mar 24 17:42:36 2008
New Revision: 640654

URL: http://svn.apache.org/viewvc?rev=640654&view=rev
Log:
Clarify path-prefix in web.xml comments and javadocs

Modified:
    lucene/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java
    lucene/solr/trunk/src/webapp/web/WEB-INF/web.xml

Modified: lucene/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java?rev=640654&r1=640653&r2=640654&view=diff
==============================================================================
--- lucene/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java (original)
+++ lucene/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java Mon Mar
24 17:42:36 2008
@@ -358,8 +358,9 @@
   //---------------------------------------------------------------------
 
   /**
-   * set the prefix for all paths.  This is useful if you want to apply the
-   * filter to something other then *.  
+   * Set the prefix for all paths.  This is useful if you want to apply the
+   * filter to something other then /*, perhaps because you are merging this
+   * filter into a larger web application.
    * 
    * For example, if web.xml specifies:
    * 
@@ -369,7 +370,7 @@
    * </filter-mapping>
    * 
    * Make sure to set the PathPrefix to "/xxx" either with this function
-   * or in web.xml
+   * or in web.xml.
    * 
    * <init-param>
    *  <param-name>path-prefix</param-name>

Modified: lucene/solr/trunk/src/webapp/web/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/webapp/web/WEB-INF/web.xml?rev=640654&r1=640653&r2=640654&view=diff
==============================================================================
--- lucene/solr/trunk/src/webapp/web/WEB-INF/web.xml (original)
+++ lucene/solr/trunk/src/webapp/web/WEB-INF/web.xml Mon Mar 24 17:42:36 2008
@@ -34,14 +34,30 @@
   <filter>
     <filter-name>SolrRequestFilter</filter-name>
     <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>
       <param-name>path-prefix</param-name>
       <param-value>/xxx</param-value>
     </init-param>
     -->
   </filter>
+
   <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>
     <url-pattern>/*</url-pattern>
   </filter-mapping>



Mime
View raw message