As the name implies, JSP action tags are used to perform various actions during the execution of JSP page. Here, each action performs some specific task. These tasks include:
- Forwarding the current page request to another page.
- Including external page to JSP page.
- Creating a JavaBean instance.
JSP provides additional functionality to JSP pages through these action tags. Unlike directive tags, action tag conveys the information to servlet container when request is being processed.
Syntax
1 2 3 |
<jsp:action_name attribute="value"> |
List of JSP Action Tags
These are the various action tags provided by JSP: –
- jsp:forward – This tag is used to forward the request of current JSP page to any another JSP, Servlet or HTML page.
- jsp:include – This tag includes the external resource to JSP page.
- jsp:useBean – This tag deals with the object of JavaBean.
- jsp:setProperty – This tag sets the property of JavaBean object.
- jsp:getProperty – This tag gets the property associated with JavaBean object.
- jsp:text – This tag is used to write template text in JSP page.
- jsp:elements – This tag is to define XML elements dynamically.
- jsp:attribute – This tag defines the attribute of dynamically generate XML elements.
- jsp:body – This tag defines the body of dynamically generate XML elements.
- jsp:plugin – This tag is used to integrate Java components with JSPpage.