/** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse * response) */ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { ParamsBean params = new ParamsBean(req, getHostsList(), "command", "arg"); String command = params.getValue("command"); if(command == null || "".equals(command)) { command = req.getServletPath().substring(1); } logger.debug(Util.delayedFormatString("Command found: %s", command)); if(!allowed(params, getPropertiesManager().adminACL, req, res)) return; if("reload".equalsIgnoreCase(command)) { ServletContext ctxt = getServletContext(); // only one reload allowed to run, just ignore synchronous reload if(ReloadHostList.reloading.tryAcquire()) { reload(ctxt); } res.sendRedirect(req.getContextPath() + "/"); } else if("pause".equalsIgnoreCase(command)) { ServletContext ctxt = getServletContext(); pause(ctxt, params.getValue("arg")); res.sendRedirect(req.getContextPath() + "/"); } }