Version 1.5

Historical note: OXF 1.5.1 was released on March 17, 2003

New in version 1.5.2

Improved Struts integration

The Struts integration has been revamped to include support for Castor, Castor mapping files, serialization of any bean, access to ActionErrors and application resources. See the documentation for details.

NOTE: Castor has been modified to use the built-in OXF version of Xerces. If you update the provided Castor JAR file, you will need to include a version of Xerces.

New processors

This version includes new processors:

Xalan upgrade

This version ships with Apache Xalan 2.5_D1 as default XSLT transformer.

XPL language

XPL identifiers, used to identify processor inputs or outputs, support "." and "_". They conform to the following regular expression: [_A-Za-z][_A-Za-z\\-0-9.]*.

SQL processor improvements

The SQL Processor supports more column datatypes, including reading XML fragments, and introduces a type notation which is compatible with XML Schema datatypes. sql:get-columns supports the exclusion of selected columns. A new sql:value-of element is implemented. See the documentation for details.

XForms support

It is possible to specify non-standard attributes to any XForms element using the xxforms prefix. A special element,xxforms:hidden, implements the equivalent of HTML hidden fields. See the documentation for details.

New in version 1.5.1

Multithreading issues

In rare situations, a race condition could cause NullPointerExceptions or other error messages from the Pipeline processor when multiple HTTP requests were handled concurrently. This condition is fixed.

Performance and memory improvements

This version features major performance improvements. In particular the Pipeline processor is more efficient. The memory consumption has also been reduced, enabling the cache to store more objects with the same VM heap size.

Sample application: error handling

When a problem occurred in the sample application, a grey page was shown with a copyright notice. The page now displays more information about the error (including a description of the problem, the location where it occurred if available and the Java stack trace), as it was the case in version 1.0.

Sample application: log format

The log entries include a date. This is an example of the format used:

2003-03-06 10:48:59,939 INFO OXF OXFServlet - /examples/ - Received request

The format can be customized in config/log4j.xml.

More data types supported by SQL processor

The SQL processor correctly supports sql:get-double and sql:get-decimal. In order to be compatible with XPath 1.0, which does not support the scientific (exponential) format, floating-point numbers are output without the scientific format.

Struts example

The Struts example included in version 1.5 didn't work as expected. This version fixes the issue.

Web application controller

Setting multiple <param> elements in a <page> element works correctly.

Pipeline processor: error reporting

Error reporting in the Pipeline processor is improved:

  • The Pipeline processor used to generate a NullPointerException in certain cases when an input could not be found; it now correctly reports the missing input.
  • When a processor cannot be loaded, for example because its implementation class cannot be found, an error message is issued with the name of the processor and the class name.

XSLT transformer caching

The XSLT transformer is fully aware of calls to the XPath document() function in XSLT stylesheets. Assume that we have a transformation including:

  • A stylesheet document ( config input)
  • An input document ( data input)
  • An included document (using the XPath document() function in the stylesheet)

If none of those documents have changed, then the output of the transformation can be cached. But the transformation is always reapplied if the included document has changed.

Java processor and Tomcat

There was an issue with the Java processor and Tomcat, due to the handling of the temporary directory. This issue is fixed.

XForms support

  • The attribute encoding of the submission element is supported in the XForms model. When present, an attribute enctype will be added to the generated form element. The enctype attribute value is set to the value of the encoding attribute in the XForms model.
  • Attributes in the XForms model are now supported. Attributes can be referenced with an XPath expression just like elements.

JavaServer Faces integration

The preliminary JavaServer Faces integration now works with the Sun Reference implementation version 1.0 Early Access 3 (EA3) of JSF. Version 1.0 Early Access 2 (EA2) is no longer supported.

Changes to redirect processor

The Redirect Processor now supports multiple value elements in a parameter element, so as to be consistent with the Request Generator.

New in version 1.5

Application server support

OXF version 1.5 supports the following application servers:

  • Jakarta Tomcat 4.0 and 4.1
  • BEA WebLogic 6.1 and 7
  • IBM WebSphere 4 and 5
  • Sun SunOne 7

Performance and memory consumption

Performance improved considerably in this release. OXF also requires much less memory to run efficiently. These are both consequences of the new cache system (more on this below) as well as many other improvements in the product.

Web application controller enhancements

In the Web Application Controller configuration, the xformsmodel and view attributes had to point to an XPL document. In this version, XPL, XSLT and regular XML documents are supported. In addition, a new mechanism allows passing URL fragments to the model through the instance using matchers.

The OXF documentation example is now using a matcher in the Web Application Controller configuration file to extract information from the URL. The documentation for this example explains how this new feature can be applied.

The view element in the Web Application Controller configuration has a new optional attributexforms-output-prologue. This attribute points to an XSL (or XPL) file which is applied to the view before the XForms elements are transformed into HTML-like attributes.

Session handling

There are two new processors used to store/retrieve XML documents into/from the session: the Session Serializer and Session Generator.

Content-length HTTP header

The HTML serializer is able to send a Content-Length header. The content length is only sent when the complete result is cached.

Cache size

A new cache is provided with this version. The previous cache used soft references, which was problematic for two reasons:

  • Interoperability: not all the Java VMs correctly implement soft references.
  • Performance: depending on the value of the -XX:SoftRefLRUPolicyMSPerMB VM parameter (Sun VMs), the soft references were either:
    • collected too early, causing many cache fault
    • collected too late, drastically reducing the amount of free memory at any time which in turn triggered numerous full garbage collections

The new cache is more efficient and solves the two issues above. You can tune the cache by setting its size.

XSLTC dependency

XSLTC is an XSLT transformer that compiles stylesheets into Java bytecode. XSLTC is part of the Xalan distribution but is not as stable as the standard Xalan XSLT transformer. We do not support the use of XSLTC in this release. The oxf.xslt.transformerproperty must be set to interpreter.

Request generator configuration

The Request Generator is now fully configurable. You can define the the subset of the request you are interested in.

HTML, XML and text serializers

The HTML, XML and text serializers are now configurable. In particular, you can set the MIME type, status code and error code sent to the client.

Also, all the HTTP serializers (XML, HTML, text and FOP) will flush their output stream when they encounter the following processing instructions: <?oxf-serializer flush?>. This enables the client's browser to incrementally display a Web page. Incremental display is typically useful when sending large tables or when the first part of Web page can be sent right away, while the rest of the page cannot be sent until a time consuming action is performed.

New request security processor

A new Request Security processor is available, allowing access to security-related information, such as the logged-in user, or the transport mechanism.

New namespace for web application controller configurations

Elements in the Web App Controller configuration file must use the namespace With the previous version, there was no namespace declaration.

XForms namespace change

The XForms namespace changed from to to be consistent with the latest XForms specification. The namespace is considered deprecated. It is still supported in this version for backward compatibility, but might not be supported in future versions of OXF.

XSLT stylesheet caching

Caching of XSLT stylesheet takes into account the included as well as the imported stylesheets (with <xsl:include> or<xsl:import>).

Let's consider a transformation using a stylesheet, style.xsl that includes another stylesheet, utils.xsl.

Creating the internal representation of an XSLT stylesheet, known as a transformer object, is a time consuming process. The OXF cache stores transformers in order to enhance performance. When stylesheet sources change, it is necessary to update the transformer. With OXF 1.0, the transformer was updated only if style.xsl changed, but it was not updated when only utils.xsl changed. This new version updates the transformer if style.xsl or utils.xsl changes, exactly as you would expect it to work.

JavaServer Faces integration

Preliminary JavaServer Faces integration is implemented. For more information, please read the examples documentation.

New examples

New examples are provided in the standard OXF application:

  • Shopping Cart demonstrates the new session handling processors
  • Authentication> illustrates how access to a page can be restricted
  • Address Book shows how to access a SQL database
  • JavaServer Faces> shows how to integrate with JavaServer Faces
  • OXF Pet Store is an implementation of Sun's Pet Store written 100% with OXF

JNDI and processor factories

Version 1.0 used to register processor factories in the JNDI tree. This was an issue with some application servers when multiple OXF applications (e.g. WAR or EAR packages) where deployed on the same application server instance. To solve this problem, this new version uses an internal registry instead of JNDI.