Professional Documents
Culture Documents
05 Java Server Pages - PPTX 1 PDF
05 Java Server Pages - PPTX 1 PDF
engine
container
Phases of JSP
JSP Phases
Language Basics
Conceptual Model of JSP Components
JSP Lifecycle Methods (2 plus 1)
• Scripting Elements
• Directives
• Actions
Scripting Elements
JSP Constructs – Scripting Elements
JSP Constructs – Comments
• Scriptlet
• Comment
JSP Comment
translated
General Form of a JSP Directive
Types of JSP Directive
• include
• page
• taglib
JSP Directive - include
• Value is “text/html”
• Value is “ISO-8859-1”
• <jsp:useBean>
• <jsp:setProperty>
• <jsp:getProperty>
The <jsp:useBean> Tag
• property = “*”
• property = “propertyName”
• Syntax tag :
<jsp:getProperty name=”name” property=”propertyName” />
Where
name – name of the bean instance from this property is obtained
property – name the property to get; this is an instance variable
in the bean (create first the bean before using the
<jsp:getProperty>, by using <jsp:useBean> or by instantiating
the object with a new operator)
Code - useBean Demo
Code - useBean Demo
Code - useBean Demo
Code - useBean Demo
Code useBean Demo Output
Code - useBean Demo Output
Looking Back
Objectives