0
|
1
|
|
2 package global.web.tools;
|
|
3
|
|
4 import java.io.IOException;
|
|
5 import java.io.PrintWriter;
|
|
6 import javax.servlet.http.HttpServlet;
|
|
7 import javax.servlet.http.HttpServletRequest;
|
|
8 import javax.servlet.http.HttpServletResponse;
|
|
9 import global.Site;
|
|
10
|
|
11
|
|
12 public final class Reindex extends HttpServlet {
|
|
13
|
|
14 protected void service(HttpServletRequest request,HttpServletResponse response)
|
|
15 throws IOException
|
|
16 {
|
|
17 if( request.getParameter("reindex") != null ) {
|
|
18 Site.startReindexing();
|
|
19 response.sendRedirect("Reindex.jtp");
|
|
20 return;
|
|
21 }
|
|
22 PrintWriter out = response.getWriter();
|
|
23
|
|
24 out.print( "\r\n<html>\r\n <head>\r\n <title>Reindex</title>\r\n </head>\r\n <body>\r\n <h1>Reindex</h1>\r\n <p>Status: " );
|
|
25 out.print( (Site.status) );
|
|
26 out.print( " (reload page to update)</p>\r\n <form action=\"Reindex.jtp\"><input type=\"submit\" name=\"reindex\" value=\"Reindex\"></form>\r\n </body>\r\n</html>\r\n" );
|
|
27
|
|
28 }
|
|
29
|
|
30 }
|
|
31
|