Oracle JavaServer Pages Developer's Guide and Reference
Release 8.1.7

Part Number A83726-01





Go to previous page Go to beginning of chapter Go to next page

JML Compile-Time Versus Runtime Considerations and Logistics

This section discusses two aspects of compile-time tag libraries compared to runtime tag libraries:

General Compile-Time Versus Runtime Considerations

The Sun Microsystems JavaServer Pages Specification, Version 1.1, describes a runtime support mechanism for custom tag libraries. This mechanism, using an XML-style tag library description file to specify the tags, is covered in "Standard Tag Library Framework".

Creating and using a tag library that adheres to this model assures that the library will be portable to any standard JSP environment.

There are, however, reasons to consider compile-time implementations:

In the future, Oracle may offer a general framework for creating custom tag libraries with compile-time tag implementations. Such implementations would depend on the OracleJSP translator, so would not be portable to other JSP environments.

The general advantages and disadvantages of compile-time implementations apply to the Oracle JML tag library as well. There may be situations where it is advantageous to use the compile-time JML implementation as first introduced in older versions of OracleJSP. There are also a few additional tags in that implementation, and some additional expression syntax that is supported. (See "JML Compile-Time/ Syntax Support" and "JML Compile-Time/ Tag Support".)

It is generally advisable, however, to use the JML runtime implementation that adheres to the JSP 1.1 specification.

The taglib Directive for Compile-Time JML Support

The OracleJSP JML support implementation uses a custom class supplied by Oracle, OpenJspRegisterLib, to implement JML tag support.

In a JSP page using JML tags with the compile-time implementation, the taglib directive must specify the fully qualified name of this class (as opposed to specifying a TLD file as in standard JSP 1.1 tag library usage).

Following is an example:

<%@ taglib uri="oracle.jsp.parse.OpenJspRegisterLib" prefix="jml" %>

For information about usage of the taglib directive for the JML runtime implementation, see "The taglib Directive".

Go to previous page
Go to beginning of chapter
Go to next page
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.