admin.item/ItemWriteCategory.java ( category - .ajax() 처리 ) - 수정
페이지 정보
작성자 관리자 작성일 23-03-23 17:22 조회 690 댓글 0본문
package admin.item;
import java.io.IOException;
import java.util.ArrayList;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import dao.ItemDAO;
import model.Category;
@WebServlet("/admin/item/category_ok")
public class ItemWriteCategory extends HttpServlet {
private static final long serialVersionUID = 1L;
public ItemWriteCategory() {
super();
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String ca_id = request.getParameter("ca_id");
String ca_id2 = request.getParameter("ca_id2");
ItemDAO dao = new ItemDAO();
ArrayList<Category> v = dao.getCategory2(ca_id); //카테고리(대분류)를 이용해 중분류 추출
request.setAttribute("v", v);
request.setAttribute("ca_id2", ca_id2);
RequestDispatcher dis = request.getRequestDispatcher("cate2.jsp");
dis.forward(request, response);
}
}
댓글목록 0
등록된 댓글이 없습니다.