Show TOC Start of Content Area

Function documentation Standard Actions  Locate the document in its SAP Library structure

Use

JSP actions facilitate JSP development with easy access to common tasks. You use standard actions to manipulate Java objects, include and forward content, and so on. You can also use the JSTL libraries and define your own actions. For more information, see JSTL and Developing Custom Tags.

Features

JSP Standard Actions

JSP Action

Syntax

Description

jsp:include

<jsp:include page="relativeURL"
flush="true | false" >
<jsp:param name="parameterName" value="parameterValue"/>
</jsp:include>

 

The jsp:include action is executed at request time and enables the inclusion of both static and dynamic content. Compared to the include directive, the jsp:include does not include the contents of the specified resource, but the output generated by the resource.

Note

You can include any type of Web resource, such as a JSP or servlet, as long as it produces content of the same type as the calling JSP.

jsp:useBean

<jsp:useBean id="name" scope="page|request |session|application" typeSpec/>

typeSpec ::= class="className"  | class="className" type="typeName" |

type="typeName" class="className" |

beanName="beanName" type="typeName" |

type="typeName" beanName="beanName" |

type="typeName"

Associates an instance of a Java object that is defined with a given scope and id and makes it available as a scripting variable of the same id.

jsp:getProperty

<jsp:getProperty name="name" property="propertyName" />

Access properties of a bean instance. Properties are converted to String and sent to the implicit out object as output.

jsp:setProperty

<jsp:setProperty name="beanName" property="property" value="value"/>

Sets the value of an attribute inside a JavaBean.

Note

To use the jsp:getProperty and the jsp:setProperty actions, the JavaBean should already be available, that is, declared in a jsp:useBean tag.

jsp:forward

<jsp:forward page="relativeURL" />

Forwards the current request to another resource of the same context as the calling JSP.

jsp:param

<jsp:param name="name" value="value" />

Supplies name-value parameter pairs. You can use this element only as a subelement of <jsp:include>, <jsp:forward>, and <jsp:params>

jsp:plugin

<jsp:plugin type="bean|applet"

code="objectCode"

codebase="objectCodebase"

{ align="alignment" }

{ archive="archiveList" }

{ height="height" }

{ hspace="hspace" }

{ jreversion="jreversion" }

{ name="componentName" }

{ vspace="vspace" }

{ title="title" }

{ width="width" }

{ nspluginurl="url" }

{ iepluginurl="url" }

{ mayscript="true|false" } >

{ <jsp:params>

{ <jsp:param name="paramName" value="paramValue" /> }+

</jsp:params> }

{ <jsp:fallback> arbitrary_text </jsp:fallback> }

</jsp:plugin>

Specifies an applet or Java Bean component and generates the necessary markup for the component to be correctly displayed in the browser.

jsp:params

<jsp:params>

{ <jsp:param name="paramName" value="paramValue" /> }+

</jsp:params>

Part of the <jsp:plugin> action. Specifies the parameters for the component included in <jsp:plugin>. You can use this action only as a subelement of the <jsp:plugin> action.

jsp:fallback

<jsp:fallback> arbitrary_text </jsp:fallback>

Specifies the content to be used if the content specified by <jsp:plugin> cannot be displayed.

jsp:element

<jsp:element name="table">

<jsp:attribute name="border">1</jsp:attribute>

<jsp:body>

</jsp:body>

</jsp:element>

Defines dynamic values in tag elements.

jsp:attribute

 

Specifies attributes for an enclosing action. You can use this action only as a subelement of another action.

jsp:body

 

Defines explicitly the body of a custom or standard action. Accepts no attributes.

jsp:invoke

<jsp:invoke fragment="abc"/>

Used in tag files only. Takes the name of an attribute as a fragment, invokes the fragment, and sends the output to an attribute, scoped variable, or to the standard output.

jsp:doBody

 

Used in tag files only. Behaves in the same way as <jsp:invoke>, except that it operates on the body of a tag.

jsp:text

<jsp:text> This is some text.</jsp:text>

Encloses template text.

jsp:output

 

Modifies properties of the output of a JSP document or tag file. Used in tag files and JSP documents in XML syntax only.

Most attributes in the standard actions have page translation-time semantics, but the following attributes accept request-time attribute expressions:

      The value attribute of jsp:setProperty

      The beanName attribute of jsp:useBean

      The page attribute of jsp:include

      The page attribute of jsp:forward

      The value attribute of jsp:param

      The height and width attributes of jsp:plugin

      The name attribute of jsp:element.

End of Content Area