Presentation is loading. Please wait.

Presentation is loading. Please wait.

JSP / Servet (2) Bayu Priyambadha, S.Kom. MVC (Model View Controller)  Model (data logic)  Java Class (standard class, servlet, JavaBeans, or other.

Similar presentations


Presentation on theme: "JSP / Servet (2) Bayu Priyambadha, S.Kom. MVC (Model View Controller)  Model (data logic)  Java Class (standard class, servlet, JavaBeans, or other."— Presentation transcript:

1 JSP / Servet (2) Bayu Priyambadha, S.Kom

2 MVC (Model View Controller)  Model (data logic)  Java Class (standard class, servlet, JavaBeans, or other classes that use JEE API)  JSP  Data access component, JDBC or EJB  View  JSP  Controller  Servlet

3 Controller  The controller acts as a layer of business logic  The Controller will be implement function forward and include  Using : RequestDispatcher dispatcher  Example : RequestDispatcher dispatcher = request.getRequestDispatcher("hasil.jsp"); dispatcher.forward(request, response);  Controller can send any data by using : request.setAttribute(“name”,”value”);

4 View  View implemented using JSP  View present the presentation layer  Can be used as interface template  View can get data that sent by Controller using : request.getAttribute(“name")

5 Model  The Model is present as the layer of data model  Can use usual java class, Java Beans, servlet or even JSP page  Example : Class person { String name; String addr; }

6 Set Servlet as Default Page myServlet 1 myServlet /myServlet 30 myServlet

7


Download ppt "JSP / Servet (2) Bayu Priyambadha, S.Kom. MVC (Model View Controller)  Model (data logic)  Java Class (standard class, servlet, JavaBeans, or other."

Similar presentations


Ads by Google