4b22b9337f359bfd063322244f5336cc7c6ffcfars<%@ page import="org.apache.solr.core.SolrCore" %>
4b22b9337f359bfd063322244f5336cc7c6ffcfars<%@ page import="java.util.Collection" %>
4b22b9337f359bfd063322244f5336cc7c6ffcfars<%--
4b22b9337f359bfd063322244f5336cc7c6ffcfars Licensed to the Apache Software Foundation (ASF) under one or more
4b22b9337f359bfd063322244f5336cc7c6ffcfars contributor license agreements. See the NOTICE file distributed with
4b22b9337f359bfd063322244f5336cc7c6ffcfars this work for additional information regarding copyright ownership.
4b22b9337f359bfd063322244f5336cc7c6ffcfars The ASF licenses this file to You under the Apache License, Version 2.0
4b22b9337f359bfd063322244f5336cc7c6ffcfars (the "License"); you may not use this file except in compliance with
4b22b9337f359bfd063322244f5336cc7c6ffcfars the License. You may obtain a copy of the License at
4b22b9337f359bfd063322244f5336cc7c6ffcfars
4b22b9337f359bfd063322244f5336cc7c6ffcfars http://www.apache.org/licenses/LICENSE-2.0
4b22b9337f359bfd063322244f5336cc7c6ffcfars
4b22b9337f359bfd063322244f5336cc7c6ffcfars Unless required by applicable law or agreed to in writing, software
4b22b9337f359bfd063322244f5336cc7c6ffcfars distributed under the License is distributed on an "AS IS" BASIS,
4b22b9337f359bfd063322244f5336cc7c6ffcfars WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4b22b9337f359bfd063322244f5336cc7c6ffcfars See the License for the specific language governing permissions and
4b22b9337f359bfd063322244f5336cc7c6ffcfars limitations under the License.
4b22b9337f359bfd063322244f5336cc7c6ffcfars--%>
4b22b9337f359bfd063322244f5336cc7c6ffcfars
4b22b9337f359bfd063322244f5336cc7c6ffcfars<html>
4b22b9337f359bfd063322244f5336cc7c6ffcfars<head>
7b709169bbe45d42fe0022b2267f672d18ce4adbMark Haywood<link rel="stylesheet" type="text/css" href="solr-admin.css">
7b709169bbe45d42fe0022b2267f672d18ce4adbMark Haywood<link rel="icon" href="favicon.ico" type="image/ico"></link>
4b22b9337f359bfd063322244f5336cc7c6ffcfars<link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
4b22b9337f359bfd063322244f5336cc7c6ffcfars<title>Welcome to Solr</title>
4b22b9337f359bfd063322244f5336cc7c6ffcfars</head>
4b22b9337f359bfd063322244f5336cc7c6ffcfars
4b22b9337f359bfd063322244f5336cc7c6ffcfars<body>
4b22b9337f359bfd063322244f5336cc7c6ffcfars<h1>Welcome to Solr!</h1>
7b709169bbe45d42fe0022b2267f672d18ce4adbMark Haywood<a href="."><img border="0" align="right" height="78" width="142" src="admin/solr_small.png" alt="Solr"/></a>
4b22b9337f359bfd063322244f5336cc7c6ffcfars
4b22b9337f359bfd063322244f5336cc7c6ffcfars<%
4b22b9337f359bfd063322244f5336cc7c6ffcfars org.apache.solr.core.CoreContainer cores = (org.apache.solr.core.CoreContainer)request.getAttribute("org.apache.solr.CoreContainer");
4b22b9337f359bfd063322244f5336cc7c6ffcfars Collection<SolrCore> solrCores = cores.getCores();
4b22b9337f359bfd063322244f5336cc7c6ffcfars if( cores != null
4b22b9337f359bfd063322244f5336cc7c6ffcfars && solrCores.size() > 0 // HACK! check that we have valid names...
&& solrCores.iterator().next().getName().length() != 0 ) {
for( org.apache.solr.core.SolrCore core : cores.getCores() ) {
String coreName = core.getName();
if("".equals(coreName) ) coreName =".";
%>
<a href="<%= coreName %>/admin/">Admin <%= core.getName() %></a>
<br/>
<% }} else { %>
<a href="admin/">Solr Admin</a>
<% } %>
</body>
</html>