|
|
|
@ -18,6 +18,17 @@ public class CreateCTHandler extends HttpServlet {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
|
|
|
|
|
|
|
|
|
String hostname = !req.getParameter("hostname").equals("") ? req.getParameter("hostname") : "default-hostname";
|
|
|
|
|
String cores = !req.getParameter("cores").equals("") ? req.getParameter("cores") : "2";
|
|
|
|
|
String ram = !req.getParameter("ram").equals("") ? req.getParameter("ram") : "1024";
|
|
|
|
|
String disk = !req.getParameter("disk").equals("") ? req.getParameter("disk") : "16";
|
|
|
|
|
|
|
|
|
|
req.setAttribute("hostname", hostname);
|
|
|
|
|
req.setAttribute("cores", cores);
|
|
|
|
|
req.setAttribute("ram", ram);
|
|
|
|
|
req.setAttribute("disk", disk);
|
|
|
|
|
|
|
|
|
|
this.getServletContext().getRequestDispatcher("/WEB-INF/createct.jsp").forward(req, resp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|