Sunday, September 12, 2010

JSP / JSTL / EL

JSP
JavaServer Pages (JSP) - is the standard presentation-layer technology for the J2EE platform.

JSP scripting elements:
  • expressions
    - form: <%= javaExpression %>
    - ex: date = <%= new java.util.Date() %>
    - xml syntax: <jsp:expression>javaExpression</jsp:expression>
  • scriptlets
    - form: <% code %>
    - xml syntax: <jsp:scriplet>code</jsp:scriplet>
  • declarations
    - form: <!% code %>
    - xml syntax: <jsp:declaration>code</jsp:declaration>
Comments
  • JSP Comment - <%-- JSP Comment --%>
  • HTML Comment - <!-- HTML Comment -->
Predefined vars: request, response, session, out, application, config, pageContext and page

JSTL

JSP Standard Tag Library (JSTL) - is a collection of standard custom tag libraries that implement basic functionality common to a wide range of server-side Java applications.

EL
Expression Language (EL) - is a simplified form for JSP expression
- syntax: ${elExpression}

Source:
http://www.ibm.com/developerworks/java/library/j-jstl0211.html
http://download.oracle.com/docs/cd/E17802_01/j2ee/j2ee/1.4/docs/tutorial-update2/doc/index.html

No comments:

Post a Comment