GNO Lab

All about nothing. Don't Panic!

Browsing Posts in Java

JSTL (JSR 52)

No comments

JSTL comes in a number of flavors and implementations. The JSRs are the specifications.

A good tutorial on the issues can be found on Herong’s Tutorial Notes.

The JSTL libraries come in two flavors, the “rt” and the “el” libraries:

RT (run-time)

The “rt” tag libraries will accept request-time expressions for most attribute values as in:

<c:out value='<%= ((Foo)session.getAttribute("foo")).getBar()'%>/>
EL (Expression Library)

The tag libraries without the “rt” do not accept Request-time expressions but operate on EL (expression language) — for example:

<c:out value='${sessionScope.foo.bar}'/>

You can use both the “rt” and the non-rt (EL-supporting) tags in your JSP — just be sure and give them different prefixes in the taglib directives. In the long term, you want to get away from the rt tags – and use EL instead.

JSTL 1.0

Requirements: JSP 1.2 container Reference implementation:
http://www.apache.org/dist/jakarta/taglibs/standard/
EL-based tag libraries

EL-based tag libraries

Functional Area

URI

Prefix

Core http://java.sun.com/jstl/core C  
XML Processing http://java.sun.com/jstl/xml X  
Internationalization http://java.sun.com/jstl/fmt Fmt
Database Access http://java.sun.com/jstl/sql Sql

 

Runtime-based tag libraries

Functional Area

URI

Prefix

Core http://java.sun.com/jstl/core_rt c_rt
XML Processing http://java.sun.com/jstl/xml_rt x_rt
Internationalization http://java.sun.com/jstl/fmt_rt fmt_rt
Database Access http://java.sun.com/jstl/sql_rt sql_rt

JSTL 1.2 (May 8, 2006)

Requirements: JSP 2.0 container Reference implementation:
http://www.apache.org/dist/jakarta/taglibs/standard/

EL-based tag libraries

Functional Area

URI

Prefix

Core http://java.sun.com/jsp/jstl/core C  
XML Processing http://java.sun.com/jsp/jstl/xml X  
Internationalization http://java.sun.com/jsp/jstl/fmt Fmt
Database Access http://java.sun.com/jsp/jstl/sql Sql

 

Runtime-based tag libraries

Functional Area

URI

Prefix

Core http://java.sun.com/jsp/jstl/core_rt c_rt
XML Processing http://java.sun.com/jsp/jstl/xml_rt x_rt
Internationalization http://java.sun.com/jsp/jstl/fmt_rt fmt_rt
Database Access http://java.sun.com/jsp/jstl/sql_rt sql_rt

This is something to remember, and evaluate. Can the standard be used to implement a CMDB? By reading, it seams as if JCR’s audience is towards CMS, but content could be anything. The following is interesting aspects:

  • Data stored as nodes and properties. Nodes can be associated with types, which dictate the kinds of properties, number and type of child nodes, and certain behavioral characteristics of the nodes.
  • Versioning
  • XPath search capabilities

Links