Action Elements


JSP action elements begin with the “jsp:” prefix and are used to control the flow between our jsp pages and to use java beans.

Some of the jsp action tags are as follows:

1. jsp:forward

It is used to terminate the action of current page and forwards the request to another resource.

Syntax:

    <jsp:forward page=”relativeURL” />


Attribute Description
page It contains the relative URL of another page.

2. jsp:include

It is used to include the content of any other resource at request time.

Syntax:

    <jsp:include page=”relativeURL” flush=”true” />


Attribute Description
page It contains the relative URL of the page to be included.
flush It is a boolean attribute that determines whether the included resource has its buffer flushed before it is included.