ServletContext sc = getServletContext();
RequestDispatcher rd = null;
User user = new User();
user.setUsername(req.getParameter("username"));
user.setFirstName(req.getParameter("firstname"));
user.setLastName(req.getParameter("lastname"));
user.setEmail(req.getParameter("email"));
user.setPassword(req.getParameter("password"));
user.setAddress(req.getParameter("address"));
user.setCity(req.getParameter("city"));
user.setState(req.getParameter("state"));
user.setZipCode(req.getParameter("zipcode"));
if(UserManager.addUser(user))
{
rd = sc.getRequestDispatcher("/confirmation.html");
rd.forward(req, res);
}
else
{
rd = sc.getRequestDispatcher("/failure.html");
rd.forward(req, res);
}