package jp.ac.kcska.questionsystem.categorymanager.horizon; import java.io.IOException; import java.util.ArrayList; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import jp.ac.kcska.questionsystem.Mst_categoryVo; public class CategoryManagerServlet extends HttpServlet { private static final long serialVersionUID = 1L; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { GetCategoryList getCategoryList = new GetCategoryList(); ArrayList categoryList = getCategoryList.getList(); HttpSession session = req.getSession(); session.setAttribute("categoryList", categoryList); RequestDispatcher dispatcher = req.getRequestDispatcher("/categorymanager.jsp"); dispatcher.forward(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { GetCategoryList getCategoryList = new GetCategoryList(); ArrayList categoryList = getCategoryList.getList(); HttpSession session = req.getSession(); session.setAttribute("categoryList", categoryList); RequestDispatcher dispatcher = req.getRequestDispatcher("/categorymanager.jsp"); dispatcher.forward(req, resp); } }