[
https://issues.apache.org/jira/browse/SOLR-8424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15059938#comment-15059938
]
Christian Danninger commented on SOLR-8424:
-------------------------------------------
Can not attach a patch. So I drop a comment which works fine in JBoss and Jetty.
{{request.getRequestURI().substring(request.getContextPath().length());}} can
be replaced by {{request.getServletPath();}} as well.
{code}
Index: solr/core/src/java/org/apache/solr/servlet/LoadAdminUiServlet.java
===================================================================
--- solr/core/src/java/org/apache/solr/servlet/LoadAdminUiServlet.java
(revision 1720181)
+++ solr/core/src/java/org/apache/solr/servlet/LoadAdminUiServlet.java
(working copy)
@@ -26,6 +26,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
@@ -48,6 +49,9 @@
// This attribute is set by the SolrDispatchFilter
String admin =
request.getRequestURI().substring(request.getContextPath().length());
+ if ("/".equals(admin)) {
+ admin = request.getServletPath();
+ }
CoreContainer cores = (CoreContainer)
request.getAttribute("org.apache.solr.CoreContainer");
InputStream in = getServletContext().getResourceAsStream(admin);
if(in != null && cores != null) {
{code}
> Admin UI not reachable in Solr 5.4 under path /solr/
> ----------------------------------------------------
>
> Key: SOLR-8424
> URL: https://issues.apache.org/jira/browse/SOLR-8424
> Project: Solr
> Issue Type: Bug
> Components: UI, web gui
> Affects Versions: 5.4
> Environment: JBosss AS
> Reporter: Christian Danninger
> Priority: Minor
> Labels: UI, admin-interface, jboss-as7
>
> In method org.apache.solr.servlet.LoadAdminUiServlet.doGet
> request.getRequestURI().substring(request.getContextPath().length())
> will return "" using JBoss. In Version 5.2.1 there was a hard coded value
> "/admin.html". This leads to http 404.
> UI is reachable by path /solr/admin.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]