SlideShare a Scribd company logo
GUJARAT TECHNOLOGICAL UNIVERSITY
Chandkheda, Ahmedabad
Affiliated
G. H. Patel College of Engineering and Technology,
VallabhVidyanagar
A
Presentation
On
Expression Language
Under subject of
ADVANCED JAVA
Semester – VI
Computer Engineering
Submitted by: Hemant Suthar(130110107058) Submitted to: Prof. Hetal Gaudani
Content
• Definition
• Methods used to call Java Code
• Benefits of EL
• Types of EL
• References
Definition
• EL is a language that allows JSP programmers to fetch application data
stored in JavaBeans component.
Methods used to call Java Code
• The following methods are used to call the java code from a JSP page:
• 1. Placing the entire Java code in a JSP page
• 2. Defining separate helper classes that encapsulate the entire Java
code and calling these helper classes from a JSP page
• 3. Using JavaBeans and JSP page action tags
• 4. Using JSP EL
• 5. Create tag handler classes to embed the Java code
Benefits of EL
• The incorporation of EL to the JSP has helped reduce the use of
scriptles in JSP page.
• EL expressions provide short hand notations to retrieve, present, and
manipulate Web application data.
Basics of EL
• EL expressions are enclosed between the ${ and} characters.
• The most general example of an EL expression is ${object.data}
• Where, object can be any Java object representing different scope,
such as request, session.
Types of EL
• EL expression tags can be categorized into the following types:
• 1. Immediate and deferred expressions
• 2. Value expressions
• 3. Method expressions
Immediate and deferred expressions
• Two constructs are used to represent EL expressions,
JSP{ expr } used for expressions that need to be evaluated
immediately, and
 #{ expr } used for expressions that need to be evaluated at later
time.
• An expression that uses ${ expr } is called immediate expression and
• The expression that uses #{ expr } is called deferred expression
Value Expressions
• Value expressions are used to refer to objects such as JavaBeans,
Collections, enumerations and implicit objects and their properties.
• An object is referred to by using the value expression containing the
name of the object
• Suppose the ${ employee } expression is used in a JSP page, where
employee refers to the name of a JavaBean
• Which searches for the employee JavaBean in the request, session
and application scopes
• If the employee JavaBean does not exist. a null value is returned.
Continue…
• Syntax of value expression to access properties and elements of a
collection in java uses two operators. ( . ) and ( [] ).
• For example.
The name property of the employee JavaBean can be referred as
${employee.name} or ${ employee[“name"] } expression.
To access a specific element of a collections such as list or an
array inside a JavaBean we can use ${ employee.name[0] }, ${
employee.name[1] }, etc...
Continue…
• The value expressions are of two types:
• rvalue
rvalue expression can only read data, and not write data.
• lvalue
lvalue expression can read as well as write data.
Method Expressions
• Method expressions are used to call public methods. which returns a
value or object.
• Such expressions are usually deferred expressions.
• Tags usually use method expressions to call functions that perform
operations such as validating a UI component or handling the events
generated on a UI component.
• The following code snippet shows the use of method expressions in
JSF page:
Continue…
<h:form>
<h:inputText
id="email"
va1ue="#{employee.email}
validator="# {employee.validateEmail} " />
<h:commandButton
id="submit"
action="#{customer.submit}" />
</h:form>
Continue…
• The various elements shown in the preceding code snippet can be
briefly described as follows:
• The inputText tag : shows the Ullnput component in the form of a text field on
a webpage.
• The validator attribute : calls the validateEmail method of the employee
JavaBean.
• The action attribute of the commandButton tag : calls the submit method,
which carries out processing after submitting the webpage.
• The submit method : Refers to the method that is called during the invoke
application phase of the JSP life cycle.
References
• http://www.darshan.ac.in/Upload/DIET/Documents/CE/Advanced%2
0Java%20technology_Unit-7_05012015_081036AM.pdf
• Advance Java Technology by M.T. Savaliya Published by Dreamtech
Press/Wiley India, 2011
Expression language

More Related Content

What's hot

TCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer DescriptionTCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer Description
Shubham Khedekar
 
Sensor Networks Introduction and Architecture
Sensor Networks Introduction and ArchitectureSensor Networks Introduction and Architecture
Sensor Networks Introduction and Architecture
PeriyanayagiS
 
Authentication techniques
Authentication techniquesAuthentication techniques
Authentication techniques
IGZ Software house
 
Iot logical design
Iot logical designIot logical design
Iot logical design
ShilpaKrishna6
 
Multicastingand multicast routing protocols
Multicastingand multicast routing protocolsMulticastingand multicast routing protocols
Multicastingand multicast routing protocols
Iffat Anjum
 
ATM System by image processing
ATM System by image processingATM System by image processing
ATM System by image processing
shahab islam
 
Pothole Detection System
Pothole Detection SystemPothole Detection System
Pothole Detection System
BEN ROSE
 
Intelligent ambulance with automatic traffic control new
Intelligent ambulance with automatic traffic control newIntelligent ambulance with automatic traffic control new
Intelligent ambulance with automatic traffic control newNaeem Akhter
 
Firewall and its types and function
Firewall and its types and functionFirewall and its types and function
Firewall and its types and function
Nisarg Amin
 
Minor on Face Recognition System using Raspberry Pi
Minor on Face Recognition System using Raspberry PiMinor on Face Recognition System using Raspberry Pi
Minor on Face Recognition System using Raspberry Pi
Nitish Bokolia
 
Spyware and rootkit
Spyware and rootkitSpyware and rootkit
Spyware and rootkit
Nikhil Pandit
 
Smart Parking System Based on embedded System and Sensor Network
Smart Parking System Based on embedded System and Sensor Network Smart Parking System Based on embedded System and Sensor Network
Smart Parking System Based on embedded System and Sensor Network
Sovan Rout
 
Vehicles Parking Management System project presentation 2020
Vehicles Parking Management System project presentation 2020Vehicles Parking Management System project presentation 2020
Vehicles Parking Management System project presentation 2020
Vikram Singh
 
J2ee
J2eeJ2ee
System Programming Unit II
System Programming Unit IISystem Programming Unit II
System Programming Unit IIManoj Patil
 
IOT Based Smart Ambulance Monitoring System with Traffic Light Control
IOT Based Smart Ambulance Monitoring System with Traffic Light ControlIOT Based Smart Ambulance Monitoring System with Traffic Light Control
IOT Based Smart Ambulance Monitoring System with Traffic Light Control
IRJET Journal
 
BAIT1103 Chapter 7
BAIT1103 Chapter 7BAIT1103 Chapter 7
BAIT1103 Chapter 7limsh
 
Web Security
Web SecurityWeb Security
Web Security
ADIEFEH
 
15 control-computer organization and archietecture-CO-COA
15 control-computer organization and archietecture-CO-COA15 control-computer organization and archietecture-CO-COA
15 control-computer organization and archietecture-CO-COA
Jay Patel
 
Project report on wireless based traffic control for emergency vehicle
Project report on wireless based traffic control for emergency vehicleProject report on wireless based traffic control for emergency vehicle
Project report on wireless based traffic control for emergency vehicle
Neeraj Lohani
 

What's hot (20)

TCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer DescriptionTCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer Description
 
Sensor Networks Introduction and Architecture
Sensor Networks Introduction and ArchitectureSensor Networks Introduction and Architecture
Sensor Networks Introduction and Architecture
 
Authentication techniques
Authentication techniquesAuthentication techniques
Authentication techniques
 
Iot logical design
Iot logical designIot logical design
Iot logical design
 
Multicastingand multicast routing protocols
Multicastingand multicast routing protocolsMulticastingand multicast routing protocols
Multicastingand multicast routing protocols
 
ATM System by image processing
ATM System by image processingATM System by image processing
ATM System by image processing
 
Pothole Detection System
Pothole Detection SystemPothole Detection System
Pothole Detection System
 
Intelligent ambulance with automatic traffic control new
Intelligent ambulance with automatic traffic control newIntelligent ambulance with automatic traffic control new
Intelligent ambulance with automatic traffic control new
 
Firewall and its types and function
Firewall and its types and functionFirewall and its types and function
Firewall and its types and function
 
Minor on Face Recognition System using Raspberry Pi
Minor on Face Recognition System using Raspberry PiMinor on Face Recognition System using Raspberry Pi
Minor on Face Recognition System using Raspberry Pi
 
Spyware and rootkit
Spyware and rootkitSpyware and rootkit
Spyware and rootkit
 
Smart Parking System Based on embedded System and Sensor Network
Smart Parking System Based on embedded System and Sensor Network Smart Parking System Based on embedded System and Sensor Network
Smart Parking System Based on embedded System and Sensor Network
 
Vehicles Parking Management System project presentation 2020
Vehicles Parking Management System project presentation 2020Vehicles Parking Management System project presentation 2020
Vehicles Parking Management System project presentation 2020
 
J2ee
J2eeJ2ee
J2ee
 
System Programming Unit II
System Programming Unit IISystem Programming Unit II
System Programming Unit II
 
IOT Based Smart Ambulance Monitoring System with Traffic Light Control
IOT Based Smart Ambulance Monitoring System with Traffic Light ControlIOT Based Smart Ambulance Monitoring System with Traffic Light Control
IOT Based Smart Ambulance Monitoring System with Traffic Light Control
 
BAIT1103 Chapter 7
BAIT1103 Chapter 7BAIT1103 Chapter 7
BAIT1103 Chapter 7
 
Web Security
Web SecurityWeb Security
Web Security
 
15 control-computer organization and archietecture-CO-COA
15 control-computer organization and archietecture-CO-COA15 control-computer organization and archietecture-CO-COA
15 control-computer organization and archietecture-CO-COA
 
Project report on wireless based traffic control for emergency vehicle
Project report on wireless based traffic control for emergency vehicleProject report on wireless based traffic control for emergency vehicle
Project report on wireless based traffic control for emergency vehicle
 

Viewers also liked

Bolígrafos importación
Bolígrafos importaciónBolígrafos importación
Bolígrafos importaciónmelior10
 
La web2 francis
La web2 francisLa web2 francis
La web2 francis
FRANCIS GUEVARA
 
Maddie joshmontanamarsha
Maddie joshmontanamarshaMaddie joshmontanamarsha
Maddie joshmontanamarsha
maddie_haynes
 
Why product of two negative numbers is positive?
Why product of two negative numbers is positive? Why product of two negative numbers is positive?
Why product of two negative numbers is positive?
Anish Goel
 
The Success Guide V4
The Success Guide V4The Success Guide V4
The Success Guide V4Brett Loveday
 
Presentation lea sj. de jesus
Presentation  lea sj. de jesusPresentation  lea sj. de jesus
Presentation lea sj. de jesusraf0208
 
All process models
All process modelsAll process models
All process models
Hemant Suthar
 
2009 rocks_and_minerals__the_restless_earth_
2009  rocks_and_minerals__the_restless_earth_2009  rocks_and_minerals__the_restless_earth_
2009 rocks_and_minerals__the_restless_earth_
lervinofri
 
Lluvia de ofertas
Lluvia de ofertasLluvia de ofertas
Lluvia de ofertasmelior10
 
Pancasila sebagai solusi permasalahan suatu bangsa
Pancasila sebagai solusi permasalahan suatu bangsaPancasila sebagai solusi permasalahan suatu bangsa
Pancasila sebagai solusi permasalahan suatu bangsaGeby Otivriyanti
 
ILLUMINATION & LIGHTING
ILLUMINATION & LIGHTINGILLUMINATION & LIGHTING
ILLUMINATION & LIGHTINGHemant Suthar
 
Palliative care
Palliative care Palliative care
Palliative care jalyjo
 

Viewers also liked (16)

Bolígrafos importación
Bolígrafos importaciónBolígrafos importación
Bolígrafos importación
 
Core design meeting 1
Core design meeting 1Core design meeting 1
Core design meeting 1
 
La web2 francis
La web2 francisLa web2 francis
La web2 francis
 
Maddie joshmontanamarsha
Maddie joshmontanamarshaMaddie joshmontanamarsha
Maddie joshmontanamarsha
 
Why product of two negative numbers is positive?
Why product of two negative numbers is positive? Why product of two negative numbers is positive?
Why product of two negative numbers is positive?
 
The Success Guide V4
The Success Guide V4The Success Guide V4
The Success Guide V4
 
Presentation lea sj. de jesus
Presentation  lea sj. de jesusPresentation  lea sj. de jesus
Presentation lea sj. de jesus
 
All process models
All process modelsAll process models
All process models
 
2009 rocks_and_minerals__the_restless_earth_
2009  rocks_and_minerals__the_restless_earth_2009  rocks_and_minerals__the_restless_earth_
2009 rocks_and_minerals__the_restless_earth_
 
facebook
facebookfacebook
facebook
 
Core design meeting 1
Core design meeting 1Core design meeting 1
Core design meeting 1
 
wiwrvdm
wiwrvdmwiwrvdm
wiwrvdm
 
Lluvia de ofertas
Lluvia de ofertasLluvia de ofertas
Lluvia de ofertas
 
Pancasila sebagai solusi permasalahan suatu bangsa
Pancasila sebagai solusi permasalahan suatu bangsaPancasila sebagai solusi permasalahan suatu bangsa
Pancasila sebagai solusi permasalahan suatu bangsa
 
ILLUMINATION & LIGHTING
ILLUMINATION & LIGHTINGILLUMINATION & LIGHTING
ILLUMINATION & LIGHTING
 
Palliative care
Palliative care Palliative care
Palliative care
 

Similar to Expression language

Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 6...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 6... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 6...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 6...
WebStackAcademy
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
Raheela Patel
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
Shah Nawaz Bhurt
 
Complete PPT about the Java lokesh kept it
Complete PPT about the Java lokesh kept itComplete PPT about the Java lokesh kept it
Complete PPT about the Java lokesh kept it
lokeshpappaka10
 
JSP.pptx
JSP.pptxJSP.pptx
JSP.pptx
NishaRohit6
 
WTA-MODULE-4.pptx
WTA-MODULE-4.pptxWTA-MODULE-4.pptx
WTA-MODULE-4.pptx
ChayapathiAR
 
SCWCD : Java server pages CHAP : 9
SCWCD : Java server pages  CHAP : 9SCWCD : Java server pages  CHAP : 9
SCWCD : Java server pages CHAP : 9
Ben Abdallah Helmi
 
Spatial approximate string search Doc
Spatial approximate string search DocSpatial approximate string search Doc
Spatial approximate string search Doc
Sudha Hari Tech Solution Pvt ltd
 
Implicit Objects &Handling.pptx
Implicit Objects &Handling.pptxImplicit Objects &Handling.pptx
Implicit Objects &Handling.pptx
KSuvetha1
 
JSP AND XML USING JAVA WITH GET AND POST METHODS
JSP AND XML USING JAVA WITH GET AND POST METHODSJSP AND XML USING JAVA WITH GET AND POST METHODS
JSP AND XML USING JAVA WITH GET AND POST METHODS
bharathiv53
 
JSP Directives
JSP DirectivesJSP Directives
JSP Directives
ShahDhruv21
 
Unified Expression Language
Unified Expression LanguageUnified Expression Language
Unified Expression Language
BG Java EE Course
 
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010
Lars Vogel
 
Final Java-script.pptx
Final Java-script.pptxFinal Java-script.pptx
Final Java-script.pptx
AlkanthiSomesh
 
Iwt note(module 2)
Iwt note(module 2)Iwt note(module 2)
Iwt note(module 2)SANTOSH RATH
 
Jsp
JspJsp
JavaScript, often abbreviated as JS, is a programming language and core techn...
JavaScript, often abbreviated as JS, is a programming language and core techn...JavaScript, often abbreviated as JS, is a programming language and core techn...
JavaScript, often abbreviated as JS, is a programming language and core techn...
MathivananP4
 
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Ayes Chinmay
 
WEB TECHNOLOGIES JSP
WEB TECHNOLOGIES  JSPWEB TECHNOLOGIES  JSP
Jsp Introduction Tutorial
Jsp Introduction TutorialJsp Introduction Tutorial
Jsp Introduction Tutorial
APSMIND TECHNOLOGY PVT LTD.
 

Similar to Expression language (20)

Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 6...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 6... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 6...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 6...
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Complete PPT about the Java lokesh kept it
Complete PPT about the Java lokesh kept itComplete PPT about the Java lokesh kept it
Complete PPT about the Java lokesh kept it
 
JSP.pptx
JSP.pptxJSP.pptx
JSP.pptx
 
WTA-MODULE-4.pptx
WTA-MODULE-4.pptxWTA-MODULE-4.pptx
WTA-MODULE-4.pptx
 
SCWCD : Java server pages CHAP : 9
SCWCD : Java server pages  CHAP : 9SCWCD : Java server pages  CHAP : 9
SCWCD : Java server pages CHAP : 9
 
Spatial approximate string search Doc
Spatial approximate string search DocSpatial approximate string search Doc
Spatial approximate string search Doc
 
Implicit Objects &Handling.pptx
Implicit Objects &Handling.pptxImplicit Objects &Handling.pptx
Implicit Objects &Handling.pptx
 
JSP AND XML USING JAVA WITH GET AND POST METHODS
JSP AND XML USING JAVA WITH GET AND POST METHODSJSP AND XML USING JAVA WITH GET AND POST METHODS
JSP AND XML USING JAVA WITH GET AND POST METHODS
 
JSP Directives
JSP DirectivesJSP Directives
JSP Directives
 
Unified Expression Language
Unified Expression LanguageUnified Expression Language
Unified Expression Language
 
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010
 
Final Java-script.pptx
Final Java-script.pptxFinal Java-script.pptx
Final Java-script.pptx
 
Iwt note(module 2)
Iwt note(module 2)Iwt note(module 2)
Iwt note(module 2)
 
Jsp
JspJsp
Jsp
 
JavaScript, often abbreviated as JS, is a programming language and core techn...
JavaScript, often abbreviated as JS, is a programming language and core techn...JavaScript, often abbreviated as JS, is a programming language and core techn...
JavaScript, often abbreviated as JS, is a programming language and core techn...
 
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
 
WEB TECHNOLOGIES JSP
WEB TECHNOLOGIES  JSPWEB TECHNOLOGIES  JSP
WEB TECHNOLOGIES JSP
 
Jsp Introduction Tutorial
Jsp Introduction TutorialJsp Introduction Tutorial
Jsp Introduction Tutorial
 

Recently uploaded

Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 

Recently uploaded (20)

Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 

Expression language

  • 1. GUJARAT TECHNOLOGICAL UNIVERSITY Chandkheda, Ahmedabad Affiliated G. H. Patel College of Engineering and Technology, VallabhVidyanagar A Presentation On Expression Language Under subject of ADVANCED JAVA Semester – VI Computer Engineering Submitted by: Hemant Suthar(130110107058) Submitted to: Prof. Hetal Gaudani
  • 2. Content • Definition • Methods used to call Java Code • Benefits of EL • Types of EL • References
  • 3. Definition • EL is a language that allows JSP programmers to fetch application data stored in JavaBeans component.
  • 4. Methods used to call Java Code • The following methods are used to call the java code from a JSP page: • 1. Placing the entire Java code in a JSP page • 2. Defining separate helper classes that encapsulate the entire Java code and calling these helper classes from a JSP page • 3. Using JavaBeans and JSP page action tags • 4. Using JSP EL • 5. Create tag handler classes to embed the Java code
  • 5. Benefits of EL • The incorporation of EL to the JSP has helped reduce the use of scriptles in JSP page. • EL expressions provide short hand notations to retrieve, present, and manipulate Web application data.
  • 6. Basics of EL • EL expressions are enclosed between the ${ and} characters. • The most general example of an EL expression is ${object.data} • Where, object can be any Java object representing different scope, such as request, session.
  • 7. Types of EL • EL expression tags can be categorized into the following types: • 1. Immediate and deferred expressions • 2. Value expressions • 3. Method expressions
  • 8. Immediate and deferred expressions • Two constructs are used to represent EL expressions, JSP{ expr } used for expressions that need to be evaluated immediately, and  #{ expr } used for expressions that need to be evaluated at later time. • An expression that uses ${ expr } is called immediate expression and • The expression that uses #{ expr } is called deferred expression
  • 9. Value Expressions • Value expressions are used to refer to objects such as JavaBeans, Collections, enumerations and implicit objects and their properties. • An object is referred to by using the value expression containing the name of the object • Suppose the ${ employee } expression is used in a JSP page, where employee refers to the name of a JavaBean • Which searches for the employee JavaBean in the request, session and application scopes • If the employee JavaBean does not exist. a null value is returned.
  • 10. Continue… • Syntax of value expression to access properties and elements of a collection in java uses two operators. ( . ) and ( [] ). • For example. The name property of the employee JavaBean can be referred as ${employee.name} or ${ employee[“name"] } expression. To access a specific element of a collections such as list or an array inside a JavaBean we can use ${ employee.name[0] }, ${ employee.name[1] }, etc...
  • 11. Continue… • The value expressions are of two types: • rvalue rvalue expression can only read data, and not write data. • lvalue lvalue expression can read as well as write data.
  • 12. Method Expressions • Method expressions are used to call public methods. which returns a value or object. • Such expressions are usually deferred expressions. • Tags usually use method expressions to call functions that perform operations such as validating a UI component or handling the events generated on a UI component. • The following code snippet shows the use of method expressions in JSF page:
  • 13. Continue… <h:form> <h:inputText id="email" va1ue="#{employee.email} validator="# {employee.validateEmail} " /> <h:commandButton id="submit" action="#{customer.submit}" /> </h:form>
  • 14. Continue… • The various elements shown in the preceding code snippet can be briefly described as follows: • The inputText tag : shows the Ullnput component in the form of a text field on a webpage. • The validator attribute : calls the validateEmail method of the employee JavaBean. • The action attribute of the commandButton tag : calls the submit method, which carries out processing after submitting the webpage. • The submit method : Refers to the method that is called during the invoke application phase of the JSP life cycle.