JSP 2.0

OnJava published an article on JSP 2.0, the new version of the Java Server Pages specification. New features in this release:

  • The Expression Language first introduced by the JSTL 1.0 specification is now incorporated in the JSP specification, making it available for use with all standard and custom components, as well as in template text.
  • The EL has been extended with a function call mechanism that JSTL 1.1 takes advantage of to make a set of commonly needed functions readily available.
  • JSP error pages now have access to more information about the error, through new variables that are better aligned with the error-handling mechanism defined by the servlet specification.
  • The requirements for how containers report JSP syntax errors have been made stricter to make it easier to find out what's wrong.
  • All J2EE 1.4 specifications, including JSP 2.0 and Servlet 2.4, use XML schema for declaration of the deployment descriptor rules. One benefit of this is that you can now list the declarations in the web.xml file in any order. JSP 2.0 also adds a number of new configuration options to the deployment descriptor, to allow for global configuration instead of per-page configuration.
  • Writing JSP pages as XML documents is now much easier, thanks to more flexible rules and new standard action elements.
  • Custom tag libraries can now be developed as a set of tag files (text files with JSP elements), and tag handlers implemented as Java classes can use a new, simplified tag handler API. At the same time, a number of new features, such as support for a dynamic attribute list and executable fragment attributes, have been added.