mirror of https://github.com/apache/lucene.git
declare admin-pages to return UTF-8, add space in content-type strings: SOLR-35
git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@423562 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
929d0d332e
commit
70c8fc4b46
|
@ -1,3 +1,4 @@
|
||||||
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%@ page import="org.apache.solr.core.SolrConfig,
|
<%@ page import="org.apache.solr.core.SolrConfig,
|
||||||
org.apache.solr.core.SolrCore,
|
org.apache.solr.core.SolrCore,
|
||||||
org.apache.solr.schema.IndexSchema,
|
org.apache.solr.schema.IndexSchema,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%@ page import="org.apache.solr.core.SolrCore,
|
<%@ page import="org.apache.solr.core.SolrCore,
|
||||||
org.apache.solr.schema.IndexSchema,
|
org.apache.solr.schema.IndexSchema,
|
||||||
java.io.File,
|
java.io.File,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%@ page import="org.apache.lucene.analysis.Analyzer,
|
<%@ page import="org.apache.lucene.analysis.Analyzer,
|
||||||
org.apache.lucene.analysis.Token,
|
org.apache.lucene.analysis.Token,
|
||||||
org.apache.lucene.analysis.TokenStream,
|
org.apache.lucene.analysis.TokenStream,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%@ page import="org.apache.solr.core.SolrCore,
|
<%@ page import="org.apache.solr.core.SolrCore,
|
||||||
org.apache.solr.schema.IndexSchema,
|
org.apache.solr.schema.IndexSchema,
|
||||||
java.io.BufferedReader,
|
java.io.BufferedReader,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%@include file="header.jsp" %>
|
<%@include file="header.jsp" %>
|
||||||
|
|
||||||
<br clear="all">
|
<br clear="all">
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
<%@ page contentType="text/plain; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%@ page import="org.apache.solr.core.Config,
|
<%@ page import="org.apache.solr.core.Config,
|
||||||
org.apache.solr.core.SolrConfig,
|
org.apache.solr.core.SolrConfig,
|
||||||
java.io.InputStream,
|
java.io.InputStream,
|
||||||
java.io.InputStreamReader,
|
java.io.InputStreamReader,
|
||||||
java.io.Reader,
|
java.io.Reader,
|
||||||
java.util.StringTokenizer"%>
|
java.util.StringTokenizer"%>
|
||||||
<%@ page contentType="text/plain;charset=UTF-8" language="java" %>
|
|
||||||
<%
|
<%
|
||||||
String fname = request.getParameter("file");
|
String fname = request.getParameter("file");
|
||||||
String optional = request.getParameter("optional");
|
String optional = request.getParameter("optional");
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%@include file="_info.jsp" %>
|
<%@include file="_info.jsp" %>
|
||||||
<script>
|
<script>
|
||||||
var host_name="<%= hostname %>"
|
var host_name="<%= hostname %>"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<!-- $Id$ -->
|
<!-- $Id$ -->
|
||||||
<!-- $Source: /cvs/main/searching/SolrServer/resources/admin/index.jsp,v $ -->
|
<!-- $Source: /cvs/main/searching/SolrServer/resources/admin/index.jsp,v $ -->
|
||||||
<!-- $Name: $ -->
|
<!-- $Name: $ -->
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%@ page import="org.apache.solr.core.SolrCore,
|
<%@ page import="org.apache.solr.core.SolrCore,
|
||||||
org.apache.solr.schema.IndexSchema,
|
org.apache.solr.schema.IndexSchema,
|
||||||
java.io.File,
|
java.io.File,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%@ page import="org.apache.solr.core.SolrConfig,
|
<%@ page import="org.apache.solr.core.SolrConfig,
|
||||||
org.apache.solr.core.SolrCore,
|
org.apache.solr.core.SolrCore,
|
||||||
org.apache.solr.core.SolrException"%>
|
org.apache.solr.core.SolrException"%>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%@ page import="org.apache.solr.core.SolrCore,
|
<%@ page import="org.apache.solr.core.SolrCore,
|
||||||
org.apache.solr.schema.IndexSchema"%>
|
org.apache.solr.schema.IndexSchema"%>
|
||||||
<%@ page import="java.io.InputStreamReader"%>
|
<%@ page import="java.io.InputStreamReader"%>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%@ page import="org.apache.solr.core.SolrInfoMBean,
|
<%@ page import="org.apache.solr.core.SolrInfoMBean,
|
||||||
org.apache.solr.core.SolrInfoRegistry,
|
org.apache.solr.core.SolrInfoRegistry,
|
||||||
java.net.URL,
|
java.net.URL,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%@ page import="org.apache.solr.core.SolrInfoMBean,
|
<%@ page import="org.apache.solr.core.SolrInfoMBean,
|
||||||
org.apache.solr.core.SolrInfoRegistry,
|
org.apache.solr.core.SolrInfoRegistry,
|
||||||
org.apache.solr.util.NamedList,
|
org.apache.solr.util.NamedList,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%@ page import="java.lang.management.ManagementFactory,
|
<%@ page import="java.lang.management.ManagementFactory,
|
||||||
java.lang.management.ThreadMXBean,
|
java.lang.management.ThreadMXBean,
|
||||||
java.lang.management.ThreadInfo,
|
java.lang.management.ThreadInfo,
|
||||||
|
|
|
@ -18,6 +18,7 @@ import org.apache.solr.core.SolrCore;
|
||||||
import org.apache.solr.core.SolrException;
|
import org.apache.solr.core.SolrException;
|
||||||
import org.apache.solr.request.XMLResponseWriter;
|
import org.apache.solr.request.XMLResponseWriter;
|
||||||
import org.apache.solr.request.SolrQueryResponse;
|
import org.apache.solr.request.SolrQueryResponse;
|
||||||
|
import org.apache.solr.request.QueryResponseWriter;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServlet;
|
import javax.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
@ -35,7 +36,6 @@ import java.io.PrintWriter;
|
||||||
public class SolrUpdateServlet extends HttpServlet {
|
public class SolrUpdateServlet extends HttpServlet {
|
||||||
final Logger log = Logger.getLogger(SolrUpdateServlet.class.getName());
|
final Logger log = Logger.getLogger(SolrUpdateServlet.class.getName());
|
||||||
private SolrCore core;
|
private SolrCore core;
|
||||||
private static String CONTENT_TYPE="text/xml;charset=UTF-8";
|
|
||||||
|
|
||||||
XMLResponseWriter xmlResponseWriter;
|
XMLResponseWriter xmlResponseWriter;
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ public class SolrUpdateServlet extends HttpServlet {
|
||||||
|
|
||||||
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
BufferedReader requestReader = request.getReader();
|
BufferedReader requestReader = request.getReader();
|
||||||
response.setContentType(CONTENT_TYPE);
|
response.setContentType(QueryResponseWriter.CONTENT_TYPE_XML_UTF8);
|
||||||
PrintWriter responseWriter = response.getWriter();
|
PrintWriter responseWriter = response.getWriter();
|
||||||
core.update(requestReader, responseWriter);
|
core.update(requestReader, responseWriter);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue