COMP9321 Web Application Engineering Semester 2, 2017

Slides:



Advertisements
Similar presentations
8 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: JavaServer Pages.
Advertisements

Java Server Pages (JSP)
 Copyright Wipro Technologies JSP Ver 1.0 Page 1 Talent Transformation Java Server Pages.
JSP: JavaServer Pages Juan Cruz Kevin Hessels Ian Moon.
28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.
18-Jun-15 JSP Java Server Pages Reference: Tutorial/Servlet-Tutorial-JSP.html.
JSP Java Server Pages Reference:
DT228/3 Web Development JSP: Directives and Scripting elements.
Java Server Pages Russell Beale. What are Java Server Pages? Separates content from presentation Good to use when lots of HTML to be presented to user,
Integrating Servlets and JavaServer Pages Vijayan Sugumaran School of Business Administration Oakland University Parts of this presentation provided by.
Three types of scripting elements: 1.Expressions 2.Scriptlets 3.Declarations Scripting elements.
JSP Architecture  JSP is a simple text file consisting of HTML or XML content along with JSP elements  JSP packages define the interface for the compiled.
Introduction to Java web programming Dr Jim Briggs JWP intro1.
Java Enterprise Edition Java Web Development Structure of a web project Introduction to Web Applications The first project Introduction to Java Web Development.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 9 JavaServer Pages (JSP) (Based on Møller.
CSC 2720 Building Web Applications Using Java Beans, Custom Tags and Tag Libraries in JSP pages.
Introduction to JSP Based on: Marty Hall, Larry Brown, Core Servlets and JavaServer Pages.
JSP Java Server Pages Softsmith Infotech.
Java Servlets and Java Server Pages Carol Wolf Computer Science.
Introduction to Java Server Pages (JSPs) Robert Thornton.
Chapter 7 Java Server Pages. Objectives Explain how the separation of concerns principle applies to JSP Describe the operation and life-cycle of a JSP.
Introduction to JavaServer Pages (JSP) Slides from Dr. Mark Llewellyn.
Java Server Pages Lecture July Java Server Pages Java Server Pages (JSPs) provide a way to separate the generation of dynamic content (java)
Jordan Anastasiade. All rights reserved.
 Embeds Java code  In HTML tags  When used well  Simple way to generate dynamic web-pages  When misused (complex embedded Java)  Terribly messy.
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
Stanisław Osiński, 2002JSP – A technology for serving dynamic web content Java Server Pages™ A technology for serving dynamic web content Stanisław Osiński,
JAVA SERVER PAGES CREATING DYNAMIC WEB PAGES USING JAVA James Faeldon CS 119 Enterprise Systems Programming.
JSTL Lec Umair©2006, All rights reserved JSTL (ni) Acronym of  JavaServer Pages Standard Tag Library JSTL (like JSP) is a specification, not an.
Introduction to JavaServer Pages. 2 JSP and Servlet Limitations of servlet  It’s inaccessible to non-programmers JSP is a complement to servlet  focuses.
SE-2840 Dr. Mark L. Hornick 1 Java Server Pages. HTML/JSPs are intended to be used as the views in an MVC- based web application Model – represents an.
Writing Enterprise Applications with J2EE (Fourth lesson) Alessio Bechini June 2002 (based on material by Monica Pawlan)
JSP Fundamentals Elements of a JSP Using Beans with JSP Integrating Servlets and JSP.
CSC 2720 Building Web Applications JavaServer Pages (JSP) The Basics.
Java server pages. A JSP file basically contains HTML, but with embedded JSP tags with snippets of Java code inside them. A JSP file basically contains.
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
Java Server Pages (JSP)
CS-4220 Dr. Mark L. Hornick 1 Java Server Pages. HTML/JSPs are intended to be used as the views in an MVC- based web application Model – represents an.
3/6/00jsp00 1 Java Server Pages Nancy McCracken Northeast Parallel Architectures Center at Syracuse University.
Chapter 11 Invoking Java Code with JSP Scripting Elements.
CSC 2720 Building Web Applications JavaServer Pages (JSP) JSP Directives and Action Elements.
JSP Pages. What and Why of JSP? JSP = Java code imbedded in HTML or XML –Static portion of the page is HTML –Dynamic portion is Java Easy way to develop.
Web Technologies Java Beans & JSP By Praveen Kumar G.
Basic JSP Celsina Bignoli Problems with Servlets Servlets contain –request processing, –business logic –response generation all lumped.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 1COMP9321, 15s2, Week.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
 Java Server Pages (JSP) By Offir Golan. What is JSP?  A technology that allows for the creation of dynamically generated web pages based on HTML, XML,
JSP JavaServer Pages. What is JSP? Java based technology that simplifies the development of dynamic web sites JSP pages are HTML pages with embedded code.
Java Server Pages. 2 Servlets The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
Bayu Priyambadha, S.Kom. Static content  Web Server delivers contents of a file (html) 1. Browser sends request to Web Server 3. Web Server sends HTML.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
JSP Action Elements Lec - 37.
JSP Based on
JSP (Java Server Page) JSP is server side technology which is used to create dynamic web pages just like Servlet technology. This is mainly used for implementing.
Java Server Pages By: Tejashri Udavant..
Java Servlets.
Scripted Page Web App Development (Java Server Pages)
Scope and State Handling in JSPs
Pre-assessment Questions
Java Server Pages (JSP)
Java Server Pages JSP 11/11/2018.
JSP Syntax.
Introduction to Java Server Pages
Java Server Pages B.Ramamurthy.
Introduction.
COSC 2956 Internet Tools Java Server Pages.
Introduction to JSP Dept. of B.Voc Software Development and System Administration St. Joseph’s College(Autonomous) Trichy-02 By Dr. J. Ronald Martin Introduction.
Scripted Page Web Application Development (Java Server Pages)
Web Technologies Java Beans & JSP
Presentation transcript:

COMP9321 Web Application Engineering Semester 2, 2017 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2465 COMP9321, 17s2, Week 3

Review: Static vs. Dynamic Web Page A static web page is delivered to the user exactly as stored, in contrast to dynamic web pages which are generated by a web application, and on demand! is-a web page whose construction is controlled by an application server processing server-side scripts. is-a e.g. software framework that provides both facilities to create web applications and a server environment to run them. Java application servers http://docs.oracle.com/javaee/6/tutorial/doc/ It's core set of API and features are defined by Java EE. The Web modules include Java Servlets and JavaServer Pages (JSP). COMP9321, 17s2, Week 3

Review: Java Servlets http://java.sun.com/products/servlet/index.jsp http://docs.oracle.com/javaee/6/tutorial/doc/bnafd.html COMP9321, 17s2, Week 3

JavaServer Pages (JSP) Technology COMP9321, 17s2, Week 3

JavaServer Pages (JSP) Technology JavaServer Pages (JSP) technology allows you to easily create web content that has both static and dynamic components. JSP technology makes available all the dynamic capabilities of Java Servlet technology; but provides a more natural approach to creating static content. JSP is similar to PHP, but it uses the Java programming language. To deploy and run JavaServer Pages, a compatible web server with a servlet container, such as Apache Tomcat, is required. COMP9321, 17s2, Week 3

Main Features of JSP technology A language for developing JSP pages, which are text-based documents that describe how to process a request and construct a response; An Expression Language (EL) for accessing server-side objects; Mechanisms for defining extensions to the JSP language; COMP9321, 17s2, Week 3

JSP Page A JSP page is a text document that contains two types of text: Static data: which can be expressed in any text-based format (such as HTML, SVG, WML, and XML); JSP elements: which construct dynamic content; The recommended file extension for the source file of a JSP page is .jsp.  The recommended extension for the source file of a fragment of a JSP page is .jspf. Encapsulates a portion of JSP code in an object that can be invoked as many times as needed. COMP9321, 17s2, Week 3

JSP Page <%= … %> is used for expressions. Kinds of tags: <%= … %> is used for expressions. e.g. <%= request.getParameter ("email") %> <%! … %> is used for declarations. e.g. <%! String name, email; %> <% … %> is used for straight Java code. e.g. <% if (x > 5) { … %> <%@ … %> is used to include another file (e.g.HTML file) or a package (e.g. java.sql.*). e.g. <%@ page contentType="text/html; charset=UTF-8" %> e.g. <%@ taglib uri="http://java.sun.com/jsp/jstl/core " prefix="c" %> COMP9321, 17s2, Week 3

JSP Example The Request: <html> <body> <h3>Enter your name and email address: </h3> <form method="get" action="hello.jsp"> <p><input type="text" name="name" value="" size="20"/> Name </p> <p><input type="text" name="email" value="" size="20"/> Email </p> <p><input type="submit" name="Send" value="Send"/> </p> </form> </body> </html> COMP9321, 17s2, Week 3

JSP Example JSP File: hello.jsp <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core " …%> <html> <body> <%! String name, email; %>   <jsp:useBean id="hello" scope="session" class="greetings.HelloBean" />   <jsp:setProperty name="hello" property="name" value='<%= request.getParameter ("name") %>‘ /> <jsp:setProperty name="hello" property="email" value=‘<%= request.getParameter ("email") %>‘ />   <% name = hello.getName(); email = hello.getEmail(); out.println ("<h3>Hello, your name is " + name); out.println (" and your email address is " + email + ".</h3>"); %> </body></html> COMP9321, 17s2, Week 3

JSP Example <%@page ... %> page directive. JSP File: <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core " …%> <html> <body> <%! String name, email; %>   <jsp:useBean id="hello" scope="session" class="greetings.HelloBean" />   <jsp:setProperty name="hello" property="name" value='<%= request.getParameter ("name") %>‘ /> <jsp:setProperty name="hello" property="email" value=‘<%= request.getParameter ("email") %>‘ />   <% name = hello.getName(); email = hello.getEmail(); out.println ("<h3>Hello, your name is " + name); out.println (" and your email address is " + email + ".</h3>"); %> </body></html> <%@page ... %> page directive. sets the content type returned by the page. COMP9321, 17s2, Week 3

JSP Example <%@taglib ... %> Tag library directives. JSP File: <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core " …%> <html> <body> <%! String name, email; %>   <jsp:useBean id="hello" scope="session" class="greetings.HelloBean" />   <jsp:setProperty name="hello" property="name" value='<%= request.getParameter ("name") %>‘ /> <jsp:setProperty name="hello" property="email" value=‘<%= request.getParameter ("email") %>‘ />   <% name = hello.getName(); email = hello.getEmail(); out.println ("<h3>Hello, your name is " + name); out.println (" and your email address is " + email + ".</h3>"); %> </body></html> <%@taglib ... %> Tag library directives. import custom tag libraries. JavaServer Pages Standard Tag Library (JSTL): JSTL extends the JSP specification by adding a tag library of JSP tags for common tasks, such as conditional execution, loops, and database access. COMP9321, 17s2, Week 3

<jsp:useBean …> JSP Example JSP File: <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core " …%> <html> <body> <%! String name, email; %>   <jsp:useBean id="hello" scope="session" class="greetings.HelloBean" />   <jsp:setProperty name="hello" property="name" value='<%= request.getParameter ("name") %>‘ /> <jsp:setProperty name="hello" property="email" value=‘<%= request.getParameter ("email") %>‘ />   <% name = hello.getName(); email = hello.getEmail(); out.println ("<h3>Hello, your name is " + name); out.println (" and your email address is " + email + ".</h3>"); %> </body></html> <jsp:useBean …> is a standard element that creates an object containing a collection of locales and initializes an identifier that points to that object. is used to locate or instantiate a bean class. Google(“what is a bean class?”) COMP9321, 17s2, Week 3

JSP Example JSP File: <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core " …%> <html> <body> <%! String name, email; %>   <jsp:useBean id="hello" scope="session" class="greetings.HelloBean" />   <jsp:setProperty name="hello" property="name" value='<%= request.getParameter ("name") %>‘ /> <jsp:setProperty name="hello" property="email" value=‘<%= request.getParameter ("email") %>‘ />   <% name = hello.getName(); email = hello.getEmail(); out.println ("<h3>Hello, your name is " + name); out.println (" and your email address is " + email + ".</h3>"); %> </body></html> COMP9321, 17s2, Week 3

<jsp:setProperty …> JSP Example JSP File: <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core " …%> <html> <body> <%! String name, email; %>   <jsp:useBean id="hello" scope="session" class="greetings.HelloBean" />   <jsp:setProperty name="hello" property="name" value='<%= request.getParameter ("name") %>‘ /> <jsp:setProperty name="hello" property="email" value=‘<%= request.getParameter ("email") %>‘ />   <% name = hello.getName(); email = hello.getEmail(); out.println ("<h3>Hello, your name is " + name); out.println (" and your email address is " + email + ".</h3>"); %> </body></html> <jsp:setProperty …> is a standard element that sets the value of an object property. COMP9321, 17s2, Week 3

JSP Example JSP File: <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core " …%> <html> <body> <%! String name, email; %>   <jsp:useBean id="hello" scope="session" class="greetings.HelloBean" />   <jsp:setProperty name="hello" property="name" value='<%= request.getParameter ("name") %>‘ /> <jsp:setProperty name="hello" property="email" value=‘<%= request.getParameter ("email") %>‘ />   <% name = hello.getName(); email = hello.getEmail(); out.println ("<h3>Hello, your name is " + name); out.println (" and your email address is " + email + ".</h3>"); %> </body></html> COMP9321, 17s2, Week 3

JSP Example request – an instance of HttpServletRequest. JSP File: <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core " …%> <html> <body> <%! String name, email; %>   <jsp:useBean id="hello" scope="session" class="greetings.HelloBean" />   <jsp:setProperty name="hello" property="name" value='<%= request.getParameter ("name") %>‘ /> <jsp:setProperty name="hello" property="email" value=‘<%= request.getParameter ("email") %>‘ />   <% name = hello.getName(); email = hello.getEmail(); out.println ("<h3>Hello, your name is " + name); out.println (" and your email address is " + email + ".</h3>"); %> </body></html> Some reserved words (JSP Objects): request – an instance of HttpServletRequest. response – an instance of HttpServletResponse. out – a PrintWriter object for the response. session – the HttpSession object associated with the session. application – an instance of ServletContext COMP9321, 17s2, Week 3

JSP Example The Bean: public class HelloBean { private String name = ""; private String email = "";   public String getName() {return name;} public String getEmail() {return email;} public void setName (String n) {name = n;} public void setEmail (String e) {email = e;} } // HelloBean Each Java server page is associated with a Java bean. These are Java programs and reside on the server. All variables have accessor (get) and mutator (set) methods. COMP9321, 17s2, Week 3

JSP COMP9321, 17s2, Week 3

Let us Revisit the WelcomeServlet COMP9321, 17s2, Week 3

Here is equivalent in JSP (welcome.jsp) COMP9321, 17s2, Week 3

JSP Basics Scriptlet Expression Declaration Comments Traditional Scripting Elements EL Scripting ${…} Modern JSP Elements Page Include Taglib Directive Elements JSP Page custom <abc:mytag> Action Elements <jsp:useBean> <jsp:getProperty> <jsp:setProperty> <jsp:include> <jsp:forward> <jsp:param> Standard Template Text (HTML bits…) COMP9321, 17s2, Week 3

JSP Basics Scriptlet Expression Declaration Comments Traditional Scripting Elements EL Scripting ${…} Modern JSP Elements Page Include Taglib Directive Elements JSP Page custom <abc:mytag> Action Elements <jsp:useBean> <jsp:getProperty> <jsp:setProperty> <jsp:include> <jsp:forward> <jsp:param> Standard Template Text (HTML bits…) COMP9321, 17s2, Week 3

JSP Elements: JSP directives COMP9321, 17s2, Week 3

JSP Elements: JSP directives <%@ taglib uri="http://www.example.com/custlib" prefix="mytag" %> <html> <body> <mytag:hello/> </body> </html> http://www.tutorialspoint.com/jsp/taglib_directive.htm COMP9321, 17s2, Week 3

JSP Basics Scriptlet Expression Declaration Comments Traditional Scripting Elements EL Scripting ${…} Modern JSP Elements Page Include Taglib Directive Elements JSP Page custom <abc:mytag> Action Elements <jsp:useBean> <jsp:getProperty> <jsp:setProperty> <jsp:include> <jsp:forward> <jsp:param> Standard Template Text (HTML bits…) COMP9321, 17s2, Week 3

JSP Elements: JSP Scripting (expression) COMP9321, 17s2, Week 3

JSP Elements: Using the implicit objects request: the HttpServletRequest object response: the HttpServletResponse object session: the HttpSession object associated with the request out: the Writer object config: the ServletCong object application: the ServletContext object Example: <html><body> <h2>JSP expressions</h2> <ul> <li>Current time is: <%= new java.util.Date() %> <li>Server Info: <%= application.getServerInfo() %> <li>Servlet Init Info: <%= config.getInitParameter("WebMaster") %> <li>This Session ID: <%= session.getId() %> <li>The value of <code>TestParam</code> is: <%= request.getParameter("TestParam") %> </ul> </body></html> COMP9321, 17s2, Week 3

JSP Elements: JSP Scripting (scriptlet) JSP scriptlet, are inserted verbatim into the translated servlet code. The scriptlet can contain any number of language statements, variable or method declarations, or expressions that are valid in the page scripting language. Within a scriptlet, you can do any of the following: Declare variables or methods to use later in the JSP page. Write expressions valid in the page scripting language. Use any of the implicit objects or any object declared with a <jsp:useBean> element. Write any other statement valid in the scripting language used in the JSP page. Remember that JSP expressions contain `(string) values', but JSP scriptlets contain `Java statements'. COMP9321, 17s2, Week 3

JSP Elements: JSP Scripting (scriptlet) Example: <HTML> <BODY> <% // This scriptlet declares and initializes "date" java.util.Date date = new java.util.Date(); %> Hello! The time is: <% out.println( date ); out.println( "<BR>Your machine's address is: " ); out.println( request.getRemoteHost()); %> </BODY> </HTML> COMP9321, 17s2, Week 3

JSP Elements: JSP Scripting (scriptlet) The following three examples, generate the same output … COMP9321, 17s2, Week 3

JSP Elements: JSP Scripting (scriptlet) Example, setting the background of a page (CoreServlet p.334) COMP9321, 17s2, Week 3

JSP Elements: JSP Scripting (scriptlet) You can also use the scriptlet to conditionally generate HTML. COMP9321, 17s2, Week 3

JSP Elements: JSP Scripting (comment) COMP9321, 17s2, Week 3

Attributes in a JSP Recall from last week. Request attributes and RequestDispatcher: We use request attributes when we want some other component of the application take over all or part of your request…. (HeadFirst) p.309 COMP9321, 17s2, Week 3

JSP Basics Scriptlet Expression Declaration Comments Traditional Scripting Elements EL Scripting ${…} Modern JSP Elements Page Include Taglib Directive Elements JSP Page custom <abc:mytag> Action Elements <jsp:useBean> <jsp:getProperty> <jsp:setProperty> <jsp:include> <jsp:forward> <jsp:param> Standard Template Text (HTML bits…) COMP9321, 17s2, Week 3

JSP Elements: JSP Actions (HeadFirst) p.309 COMP9321, 17s2, Week 3

JSP Elements: JSP Actions (include) COMP9321, 17s2, Week 3

jsp:include vs. include directive (CoreServlet p.380) COMP9321, 17s2, Week 3

JSP Elements: JSP Actions (forward) COMP9321, 17s2, Week 3

JSP Elements: JSP Actions (useBean) COMP9321, 17s2, Week 3

JSP Elements: JSP Actions (useBean) COMP9321, 17s2, Week 3

JSP Elements: JSP Actions (useBean) COMP9321, 17s2, Week 3

JSP Elements: JSP Actions (useBean) Sharing Beans: using scope attribute COMP9321, 17s2, Week 3

JSP Elements: JSP Actions (useBean) Sharing Beans: using scope attribute COMP9321, 17s2, Week 3

JSP Basics Scriptlet Expression Declaration Comments Traditional Scripting Elements EL Scripting ${…} Modern JSP Elements Page Include Taglib Directive Elements JSP Page custom <abc:mytag> Action Elements <jsp:useBean> <jsp:getProperty> <jsp:setProperty> <jsp:include> <jsp:forward> <jsp:param> Standard Template Text (HTML bits…) COMP9321, 17s2, Week 3

Expression Language (EL) in JSP COMP9321, 17s2, Week 3

Expression Language (EL) in JSP COMP9321, 17s2, Week 3

Expression Language (EL) in JSP Towards Script-less JSP COMP9321, 17s2, Week 3

Expression Language (EL) in JSP (HeadFIrst) p.367 COMP9321, 17s2, Week 3

Expression Language (EL) in JSP COMP9321, 17s2, Week 3

EL Basics: Accessing Scoped Variables COMP9321, 17s2, Week 3

EL Basics: Accessing Scoped Variables COMP9321, 17s2, Week 3

EL Basics: Using dot vs. Using [ ] operator COMP9321, 17s2, Week 3

EL Basics: Using dot vs. Using [ ] operator COMP9321, 17s2, Week 3

EL Basics: Using dot vs. Using [ ] operator COMP9321, 17s2, Week 3

EL Basics: Using dot vs. Using [ ] operator COMP9321, 17s2, Week 3

EL Basics: Using dot vs. Using [ ] operator COMP9321, 17s2, Week 3

EL Basics: Using dot vs. Using [ ] operator COMP9321, 17s2, Week 3

EL Basics: EL Implicit Objects COMP9321, 17s2, Week 3

EL Basics: EL Implicit Objects COMP9321, 17s2, Week 3

EL Basics: EL Implicit Objects COMP9321, 17s2, Week 3

EL Basics: EL Operators COMP9321, 17s2, Week 3

Assignment 1 COMP9321, 17s2, Week 3

JSP Standard Tag Library (JSTL) Appendix JSP Standard Tag Library (JSTL) AND JSP Custom Tags COMP9321, 17s2, Week 3

JSP Standard Tag Library (JSTL) COMP9321, 17s2, Week 3

JSP Standard Tag Library (JSTL) COMP9321, 17s2, Week 3

JSP Standard Tag Library (JSTL) COMP9321, 17s2, Week 3

JSP Standard Tag Library (JSTL) COMP9321, 17s2, Week 3

JSP Standard Tag Library (JSTL) COMP9321, 17s2, Week 3

JSTL Basics: Looping collections COMP9321, 17s2, Week 3

JSTL Basics: Looping collections COMP9321, 17s2, Week 3

JSTL Basics: Looping collections COMP9321, 17s2, Week 3

JSTL Basics: Conditional output COMP9321, 17s2, Week 3

JSTL Basics: Conditional output 2- https://www.ibm.com/developerworks/library/j-jstl0318/ COMP9321, 17s2, Week 3

JSTL Basics: Using <c:set> COMP9321, 17s2, Week 3

Other things available in JSTL COMP9321, 17s2, Week 3

JSP Basics Scriptlet Expression Declaration Comments Traditional Scripting Elements EL Scripting ${…} Modern JSP Elements Page Include Taglib Directive Elements JSP Page custom <abc:mytag> Action Elements <jsp:useBean> <jsp:getProperty> <jsp:setProperty> <jsp:include> <jsp:forward> <jsp:param> Standard Template Text (HTML bits…) COMP9321, 17s2, Week 3

JSP Custom Tags COMP9321, 17s2, Week 3

JSP Custom Tags Example: http://www.tutorialspoint.com/jsp/jsp_custom_tags.htm More Details: http://docs.oracle.com/javaee/5/tutorial/doc/bnalj.html COMP9321, 17s2, Week 3

COMP9321, 17s2, Week 3