Sunday, November 2, 2008

JSP 2.1 Updates

Java Server Pages (JSP) 2.1

Jsp2.1 includes webtier technologies namely Java Standard Tag Library(JSTL) and JavaServerFaces(JSF) technology. Complete alignment of JavaServer Faces technology tags and JavaServer Pages (JSP) software code.

JSP 2.1 is Part of J2EE 5.0 and Dependant on JDK 1.4, Servlet 2.5. JSP 2.1 supports annotations for dependency injection on JSP tag handlers and context listeners. New features from Faces into JSP

Support for resource injection through annotations to simplify configuring access to resources and environment data

Expression Language

The expression language provides a way to simplify expressions in JSP. It is a simple language used for accessing implicit objects and Java classes, and for manipulating collections in an elegant manner. EL provides the ability to use run-time expressions outside of JSP scripting elements.

JavaServer Faces and JavaServer Pages each has its own expression language. The expression language included in JSP provides greater flexibility to the web application developer. But those who are working with JSF have found themselves unsatisfied by the JSP expression language.

New unified EL essentially represents a union of the JSP and JSF expression languages and largely benefits JSF technology. The unified EL has the following features:

* Deferred evaluation of expressions.
* Support for expressions that can set values and expressions that can invoke methods.
* Support for using JSTL iteration tags with deferred expressions
Evaluation of EL is categorized as immediate evaluation and deferred evaluation. Immediate evaluation means a JSP page evaluates the expression when the page is rendered. With immediate evaluation, all values are always read-only. JSP EL expressions take the form of ${imExpr}. JSP expressions are evaluated immediately.

Deferred evaluation means that the technology using the unified EL takes over the responsibility of evaluating the expression from the JSP engine and evaluates the expression at the appropriate time during the page lifecycle.

Compatibility

In JSP 2.1 technology, a deferred expression does not make sense in the context of template text because evaluation of an expression is always done immediately by the JSP container. Because no entity other than the JSP container processes template text, a deferred expression would always be left unevaluated if it were included in template text. So therefore, any page authors who have included the #{ character sequence in template text probably meant to use the ${} syntax instead. Acknowledging this fact, the JSP specification authors have mandated that the inclusion of #{ in template text triggers a translation error in JSP 2.1 technology.

Maintaining compatibility with earlier versions is critical for any Java EE platform release. For JSP 2.1 technology, the only backward compatibility issue involves the EL's new support of the #{ syntax that refers to deferred expressions. The #{ character sequence can create backward compatibility problems in two situations: when the sequence is included in template text or in attribute values.

Version requires these jars:
-> ant-1.6.5.jar

-> core-3.1.1.jar

-> jsp-2.1.jar

-> jsp-api-2.1.jar

1 comments:

ashish,  April 13, 2010 at 12:11 AM  

ye hi this is really cool articles for beginner.

Blog Widget by LinkWithin

JS-Kit Comments

  © Blogger template Newspaper III by Ourblogtemplates.com 2008

Back to TOP