JSP Action Elements
JSP Action Element :
- JSP Action elements are used to control the behavior of the Servlet Engine.
- JSP Action elements can be used to insert the code dynamically into JSP and allows us to reuse the JavaBeans
- JSP have different type of action elements that are used to do certain tasks.
- JSP Action elements can be used as alternative to JSP Scriptlets for inserting the dynamic code in the page.
Syntax :
<jsp:action_name attribute="value" />
Above is the basic syntax for the JSP action element. We can use the prefix jsp for indicating the JSP action element.
Action Tag | Description |
---|---|
jsp:include | Include the runtime response of a JSP page. |
jsp:forward | Forwarding the request to a new page |
jsp:element | Defines XML elements dynamically |
jsp:attribute | defines dynamically defined XML element’s attribute |
jsp:plugin | Generates client browser-specific construct that makes an OBJECT or EMBED tag for the Java Applets |
jsp:param | Adds parameters to the request |
jsp:fallback | Supplies alternate text if java applet is unavailable on the client |
jsp:body | Used within standard or custom tags to supply the tag body. |
jsp:text | Use to write template text in JSP pages and documents. |
jsp:getProperty | Retrieval of a property from a JavaBean instance. |
jsp:setProperty | store data in JavaBeans instance. |
jsp:useBean | instantiates a JavaBean |
In the upcoming chapters we will be looking into more details about these action elements.