29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Action tag Description<br />

Used to enclose template data in XML<br />

representation. The interpretation of it to<br />

pass its content through to value of out.<br />

For now we will concentrate on the param, include, and forward tags.<br />

All action tags use the same tag syntax, which, unlike the previous tags, is XML<br />

compatible. Action tags have two forms, either an open or closed body tag. The<br />

exception is the param action, which only appears in the form of a closed body<br />

tag.<br />

The param action tag<br />

The param tag usually appears within the body of one of the other tags, and<br />

allows the inclusion of a key/value type attribute. For example, to set a parameter<br />

named foo with the value bar, the following tag may be used:<br />

<br />

The value attribute may be an expression tag that is evaluated at runtime. For<br />

example:<br />

<br />

The include action tag<br />

The include action tag provides a way to include static and dynamic content<br />

within the output produced by the JSP page containing the tag. The content<br />

included by an include action tag is parsed at request-time. This contrasts with<br />

the include directive, which is parsed at translation time.<br />

The syntax of the tag is:<br />

<br />

Or as an open-bodied tag:<br />

<br />

<br />

<br />

The page attribute specifies the relative URL, or URI, for the resource to include.<br />

The resource may be a static file, JSP, or servlet. The value of the page attribute<br />

may be specified via a JSP expression tag. The flush attribute specifies a<br />

boolean value indicating whether the page buffer should be flushed before the<br />

inclusion.<br />

Chapter 8. Working with JSPs 255

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!