lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r641109 - in /lucene/solr/trunk/src/webapp: src/org/apache/solr/servlet/SolrDispatchFilter.java web/admin/index.jsp web/index.jsp
Date Wed, 26 Mar 2008 02:09:09 GMT
Author: ehatcher
Date: Tue Mar 25 19:09:07 2008
New Revision: 641109

URL: http://svn.apache.org/viewvc?rev=641109&view=rev
Log:
Fix a couple of multicore related issues in both index.jsp pages

Modified:
    lucene/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java
    lucene/solr/trunk/src/webapp/web/admin/index.jsp
    lucene/solr/trunk/src/webapp/web/index.jsp

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=641109&r1=641108&r2=641109&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 Tue Mar
25 19:09:07 2008
@@ -191,6 +191,8 @@
         // By default use the single core.  If multicore is enabled, look for one.
         final SolrCore core;
         if (multicore != null && multicore.isEnabled()) {
+          req.setAttribute("org.apache.solr.MultiCore", multicore);
+          
           // if this is the multi-core admin page, it will handle it
           if( path.equals( multicore.getAdminPath() ) ) {
             handler = multicore.getMultiCoreHandler();
@@ -296,8 +298,7 @@
           // a servlet/jsp can retrieve it
           else {
             req.setAttribute("org.apache.solr.SolrCore", core);
-            req.setAttribute("org.apache.solr.MultiCore", multicore);
-              // Modify the request so each core gets its own /admin
+            // Modify the request so each core gets its own /admin
             if( singlecore == null && path.startsWith( "/admin" ) ) {
               req.getRequestDispatcher( pathPrefix == null ? path : pathPrefix + path ).forward(
request, response );
               return; 

Modified: lucene/solr/trunk/src/webapp/web/admin/index.jsp
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/webapp/web/admin/index.jsp?rev=641109&r1=641108&r2=641109&view=diff
==============================================================================
--- lucene/solr/trunk/src/webapp/web/admin/index.jsp (original)
+++ lucene/solr/trunk/src/webapp/web/admin/index.jsp Tue Mar 25 19:09:07 2008
@@ -49,6 +49,7 @@
 
 <%-- List the cores (that arent this one) so we can switch --%>
 <% org.apache.solr.core.MultiCore multicore = (org.apache.solr.core.MultiCore)request.getAttribute("org.apache.solr.MultiCore");
+  if (multicore!=null) {
   java.util.Collection<SolrCore> cores = multicore.getCores();
 if (cores.size() > 1) {%><tr><td><strong>Cores:</strong><br></td><td><%
   java.util.Iterator<SolrCore> icore = cores.iterator();
@@ -57,7 +58,7 @@
     if (acore == core) continue;
     %>[<a href="../../<%=acore.getName()%>/admin/"><%=acore.getName()%></a>]<%
        
   }%></td></tr><%
-}%>
+}}%>
 
 <tr>
   <td>

Modified: lucene/solr/trunk/src/webapp/web/index.jsp
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/webapp/web/index.jsp?rev=641109&r1=641108&r2=641109&view=diff
==============================================================================
--- lucene/solr/trunk/src/webapp/web/index.jsp (original)
+++ lucene/solr/trunk/src/webapp/web/index.jsp Tue Mar 25 19:09:07 2008
@@ -29,9 +29,9 @@
 
 <% 
   org.apache.solr.core.MultiCore multicore = (org.apache.solr.core.MultiCore)request.getAttribute("org.apache.solr.MultiCore");
-  if( multicore.isEnabled() ) { 
+  if(multicore != null && multicore.isEnabled() ) { 
     for( org.apache.solr.core.SolrCore core : multicore.getCores() ) {%>
-<a href="<%= core.getName() %>/admin/">Admin <%= core.getName() %> </a><br/>
+<a href="<%= core.getName() %>/admin/">Admin <%= core.getName() %></a><br/>
 <% }} else { %>
 <a href="admin/">Solr Admin</a>
 <% } %>



Mime
View raw message