admin.item/ItemView.java
페이지 정보
본문
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;
import model.Item;
@WebServlet("/admin/item/view")
public class ItemView extends HttpServlet {
private static final long serialVersionUID = 1L;
public ItemView() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
int it_uid = Integer.parseInt(request.getParameter("it_uid"));
ItemDAO dao = new ItemDAO();
Item i = dao.oneItem(it_uid);
request.setAttribute("item", i);
ArrayList<Category> v = dao.getTotal(); //카테고리 값
request.setAttribute("v", v);
RequestDispatcher dis = request.getRequestDispatcher("view.jsp");
dis.forward(request, response);
}
}
- 이전글● admin - 상품 관리 ( 상세보기 ) 23.03.23
- 다음글dao/ItemDAO.java 23.03.23
댓글목록
등록된 댓글이 없습니다.