MVC 2 4 Controller n n Model View Slides: 14 Download presentation MVCモデル 2 (4) Controller n n Model と View を制 御する Servletを使う 8 Servlet の処理 // データベースから検索して、結果をBeanに格納 List list = search(ndc, tyosya_hyouji, id, title, author, publisher); // Http. Session を取り出し、Beanを登録 Http. Session session = request. get. Session(); session. set. Attribute("book. List", list); // 後の処理をJSPに任せる context. get. Request. Dispatcher(jsp. File). forward(request, response); 12 JSP の処理 // タグライブラリの利用を宣言 <%@ taglib prefix="c" uri="http: //java. sun. com/jsp/jstl/core" %> // Http. Session から Model であるコレクションを // 取り出す <c: for. Each var="book" items="${session. Scope. book. List}" > 13 タグライブラリを使った ループ処理 <ul> <c: for. Each var="book“ items="${session. Scope. book. List}" > <li> <c: out value="${book. title}" /> / <c: out value="${book. author}" /> </li> </c: for. Each> </ul> 14 @html partialRuby validates_presence_ofModel view controllerPattern mvc javaController patternJava fx builderModel layer in mvcThin controller fat modelSprin javaBlackboard mvcMvc musterTrygve reenskaug mvcJee mvcWhat mvc stands forDesign pattern mvc java