HttpServletResponse response) throws ServletException, IOException {
try {
Connection conn = getConnection();
ProductDAO productDAO = new ProductDAO(conn);
ProductType type = ProductType.valueOf(request.getParameter("type"));
List<Entity> products = productDAO.findByType(type.name());
productDAO.fetchImage(products);
conn.close();
request.setAttribute("type", type);
request.setAttribute("products", products);