Java Unified Expression Language Examples

This example shows how we can use standalone Java Unified Expression Language part of JavaEE outside JSP or JSF.

In this case JUEL, a EL 2.2 implementation, is used

Note: Tomcat 6 provides an EL 2.1 implementation, to use JUEL with no problem in Tomcat 6 including calling arbitrary methods, avoid any use of JSP (with ItsNat you do not need JSP).

Rendering a list with EL expressions in template

Markup content in td or li in template to render:
<b>${person.name}</b> ${person.age} ${person.unitAge()} 

List of Persons using <table>

Jhon 23 years old
Paul 60 years old
George 65 years old

List of Persons using <ul><li>

Setting a property of a Java bean using an <input type=text> element with a EL expression in value attribute and a ItsNatHTMLInputText component

Expression in value attribute in template:
#{person.name}

Person Name:

New name of Person bean:


RETURN