@Override
protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
final ServletContext ctx = req.getServletContext();
final String rootPath = ctx.getRealPath("/");
final Runner installer = new Runner(new Installer(new Paths(new File(rootPath))));
if (req.getParameter("catalinaBaseDir") != null && "".equals(req.getParameter("catalinaBaseDir").trim())) {
installer.setCatalinaBaseDir(req.getParameter("catalinaBaseDir").trim());
}
if (req.getParameter("catalinaHome") != null && "".equals(req.getParameter("catalinaHome").trim())) {
installer.setCatalinaHome(req.getParameter("catalinaHome").trim());