WDD_lec_42 - Expression Language Lec - 42 Generating...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Expression Language Lec - 42
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Umair Javed©2006 Generating Dynamic Contents Technologies available Servlets JSP JavaBeans Custom Tags Expression Language (EL) JSTL JavaServer Faces (JSF)
Background image of page 2
Umair Javed©2006 Mike • Hard code developer • Handles all business logic and backend matters • Expert in Java,  Database, XML etc. Ernie • Jack of all trades • Not an expert in anything, but  will eventually get the job done…. Philippe • Web site designer • Knows how to make a  Website look really cool ! • HTML / JavaScript expert   Credit: Pierre Delisle (spec lead)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Umair Javed©2006 EL Purpose (ni) Java as the scripting language in JSP scares many people (e.g. Philippe) Can we simplify ? Expression Language (EL) A language adapted for the Web Developer
Background image of page 4
Umair Javed©2006 EL Benefits Credit: Pierre Delisle (spec lead)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Umair Javed©2006 EL overview (ni) Not a programming or scripting language Major goal: Simplicity (and really is) Inspiration from JavaScript & XML path language (XPath) Geared towards looking up objects & their properties and performing simple operation on them
Background image of page 6
Umair Javed©2006 JSP Before EL … <% Person p = (Person) request.getAttribute(“person”) %> ………. Person Name: <%= p.getName() %> ……… <% if (p.getAddress( ).equals(“defence”) ) { %> ……. <% } %> 1. Must Declare 2. Must Know Type 3. Awkward Syntax 4. Knowledge of Scripting Language required even for simple manipulations
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Umair Javed©2006 JSP After EL … Person Name: $ { p.name } <c : if test = “$ {p.address == param.add }” > ${ p.name } </c : if> 1. Direct access 2. Easier syntax 4. Better adapted expression language 3. All app data easily accessible
Background image of page 8
Expression Language nuggets
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Umair Javed©2006 EL nuggets Expressions & identifiers Arithmetic, logical & relational operators Automatic type conversion Access to beans, arrays, lists & maps Access to set of implicit objects & servlet properties
Background image of page 10
Umair Javed©2006 EL Syntax
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/01/2010 for the course CS CS506 taught by Professor mr. umair javed during the Spring '10 term at Virtual University of Pakistan.

Page1 / 34

WDD_lec_42 - Expression Language Lec - 42 Generating...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online