Mercurial Hosting > nabble
comparison src/global/web/tools/Reindex.java @ 0:7ecd1a4ef557
add content
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Thu, 21 Mar 2019 19:15:52 -0600 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:7ecd1a4ef557 |
|---|---|
| 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 |
