tailieunhanh - Java C12. JSP, MVC
Direct start from Web browser: input directly URL of JSP page into Web browser http://servername:8080/JSP/ Start by “Action” attribute of Form tag Start when you push the summitting button on form Start from JSP (or Servlet) : Start by being specified with other JSP files | Chapter 12. JSP, MVC ITSS Java Programming NGUYEN Hong Quang, HUT Content Principle of JSP Elements of JSP JavaBeans MVC architecture Outline of JSP JSP Page : embedded Java code into HTML page Principle of JSP Mecanism of calling JSP page Server Web Browser JSP Page JSP Compiler Temporary Servlet Principle of JSP JSP Servlet (Temporary Servlet) public final class HelloWorld_jsp extends implements { public void _jspInit() { } public void _jspDestroy() { } public void _jspService (HttpServletRequest request, HttpServletResponse response) throws , ServletException { } } Principle of JSP Life cycle of JSP Servlet Principle of JSP Sample application (1) Principle of JSP Sample application (2) Principle of JSP Start of JSP (Calling a JSP page) Direct start from Web browser: input directly URL of JSP page into Web browser http://servername:8080/JSP/ Start by “Action” . | Chapter 12. JSP, MVC ITSS Java Programming NGUYEN Hong Quang, HUT Content Principle of JSP Elements of JSP JavaBeans MVC architecture Outline of JSP JSP Page : embedded Java code into HTML page Principle of JSP Mecanism of calling JSP page Server Web Browser JSP Page JSP Compiler Temporary Servlet Principle of JSP JSP Servlet (Temporary Servlet) public final class HelloWorld_jsp extends implements { public void _jspInit() { } public void _jspDestroy() { } public void _jspService (HttpServletRequest request, HttpServletResponse response) throws , ServletException { } } Principle of JSP Life cycle of JSP Servlet Principle of JSP Sample application (1) Principle of JSP Sample application (2) Principle of JSP Start of JSP (Calling a JSP page) Direct start from Web browser: input directly URL of JSP page into Web browser http://servername:8080/JSP/ Start by “Action” attribute of Form tag Start when you push the summitting button on form Start from JSP (or Servlet) : Start by being specified with other JSP files Principle of JSP Elements of JSP JSP basic tag Directive tag Defined object Action tag JSP basic tags (1) Comment : Syntax : Scriptlet : Embedded Java code into JSP page Syntax : // Java code Elements of JSP JSP basic tags : Declaration Syntax : Declaration variable example Declaration method example y) return x; else return y; } %> Elements of JSP Basic Tag Example (1) JSP Basic Tags y) return x; else return y; }
đang nạp các trang xem trước