Exemple #1
0
  @Override
  public void execute(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    // TODO Auto-generated method stub

    String title = request.getParameter("title");
    String content = request.getParameter("content");
    String no = request.getParameter("no");
    String memberNo = request.getParameter("memberNo");
    Long lNo = Long.parseLong(no);

    BoardVo vo = new BoardVo();
    vo.setTitle(title);
    vo.setContent(content);
    vo.setNo(lNo);
    vo.setMemberNo(Long.parseLong(memberNo));

    BoardDAO dao = new BoardDAO();
    dao.updateBoard(vo);

    request.setAttribute("boardVo", vo);
    HttpUtil.forwarding(request, response, "/WEB-INF/views/board/view.jsp");
  }
Exemple #2
0
  @Override
  public void execute(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    // TODO Auto-generated method stub

    String no = request.getParameter("no");
    String memberNo = request.getParameter("memberNo");
    if (no == null) {
      HttpUtil.redirect(response, "/mysite/bs");
      return;
    }
    Long lNo = Long.parseLong(no);

    // Get Board Info
    BoardDAO dao = new BoardDAO();
    BoardVo vo = dao.getBoardVo(lNo);
    vo.setMemberNo(Long.parseLong(memberNo));
    /*// Update view Count
    dao.updateViewCount(lNo);*/
    request.setAttribute("boardVo", vo);

    HttpUtil.forwarding(request, response, "/WEB-INF/views/board/modify.jsp");
  }