목록JSP (284)
WON.dev
package org.joonzis.model; import java.util.Calendar; import javax.servlet.http.HttpServletRequest; public class Now { public String process(HttpServletRequest request) { Calendar cal = Calendar.getInstance(); int h = cal.get(Calendar.HOUR); int m = cal.get(Calendar.MINUTE); int s = cal.get(Calendar.SECOND); String now = h + "시" + m + "분" + s +"초"; request.setAttribute("now", now); return "view/..
package org.joonzis.controller; import java.io.IOException; 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 org.joonzis.model.Now; @WebServlet("/Controller2")//Controller2(서블릿 경로) public class Controller2 extends HttpServlet..
package org.joonzis.controller; import java.io.IOException; 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 org.joonzis.model.Today; @WebServlet("/Controller1")//Controller1(서블릿 경로) public class Controller1 extends HttpServl..
모델 2 - mvc : 구조 똑같음 모델 1 : 소규모 프로젝트에 적합 - 앞으로 다른 페이지로 이동할 때 서블릿 거쳐서 이동 - Servlet이 요청 판단하고 결정해서 실행(Servlet : Controller, 프로젝트의 중심) JSP(view) -> Servlet(controller) -> JSP(view) JSP(view) -> Servlet(controller) ->DAO(model)->DB(model) -> JSP(view) :SELECT_ALL실행 시 페이지 이동 경로 M : DB, 순수 JAVA V : html, jsp 등 C : Servlet 1. 모델 1 구조 1) JSP 파일 하나로 처리 가능 2) 간단한 로직, 프로젝트에 적합 3) Java코드와 JSP코드가 섞여있어 가독성이 떨어짐..
${bvo.b_idx } 번 게시글 작성자 ${bvo.writer } IP ${bvo.ip} 제목 ${bvo.title } 첨부파일 첨부파일 없음 ${bvo.filename } 내용 ${bvo.content } 댓글 작성자 댓글 비밀번호 댓글 내용 번호 작성자 내용 작성일 삭제 ${vo.c_idx } ${vo.writer} ${vo.content } ${vo.reg_date } 삭제 댓글이 없습니다.
${bvo.b_idx } 번 게시글 작성자 ${bvo.writer } 제목 비밀번호 첨부파일 [ 기존 첨부 파일 : 없음 ] [ 기존 첨부 파일 : ${bvo.filename } ] 내용 ${bvo.content }
${bvo.b_idx }번 게시글 삭제 작성자 ${bvo.writer } 제목 ${bvo.title } 비밀번호