@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
FtpServer server = (FtpServer) getServletContext().getAttribute(FtpServerListener.FTPSERVER_CONTEXT_NAME);
PrintWriter wr = resp.getWriter();
wr.print("<html>");
wr.print("<head>");
wr.print("<title>FtpServer status servlet</title>");
wr.print("</head>");
wr.print("<body>");
wr.print("<form method='post'>");
if(server.isStopped()) {
wr.print("<p>FtpServer is stopped.</p>");
} else {
if(server.isSuspended()) {
wr.print("<p>FtpServer is suspended.</p>");
wr.print("<p><input type='submit' name='resume' value='Resume'></p>");
wr.print("<p><input type='submit' name='stop' value='Stop'></p>");
} else {
wr.print("<p>FtpServer is running.</p>");