view src/global/web/tools/Reindex.jtp @ 66:3fbe9cb2e325 default tip

security
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 18 Sep 2024 03:51:47 -0600
parents 7ecd1a4ef557
children
line wrap: on
line source

<%
package global.web.tools;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import global.Site;


public final class Reindex extends HttpServlet {

	protected void service(HttpServletRequest request,HttpServletResponse response)
		throws IOException
	{
		if( request.getParameter("reindex") != null ) {
			Site.startReindexing();
			response.sendRedirect("Reindex.jtp");
			return;
		}
		PrintWriter out = response.getWriter();
		%>
		<html>
			<head>
				<title>Reindex</title>
			</head>
			<body>
				<h1>Reindex</h1>
				<p>Status: <%=Site.status%> (reload page to update)</p>
				<form action="Reindex.jtp"><input type="submit" name="reindex" value="Reindex"></form>
			</body>
		</html>
		<%
	}

}
%>