What are JSP actions elements?

JSPJava8Object Oriented ProgrammingProgramming

Actions use constructs in XML syntax to control the behavior of the servlet engine. You can dynamically insert a file, reuse JavaBeans components, forward the user to another page, or generate HTML for the Java plugin.

There is only one syntax for the Action element, as it conforms to the XML standard −

<jsp:action_name attribute = "value" />

Action elements are basically predefined functions. The following table lists out the available JSP actions −

S.No.Syntax & Purpose
1jsp:include
Includes a file at the time the page is requested.
2jsp:useBean
Finds or instantiates a JavaBean.
3jsp:setProperty
Sets the property of a JavaBean.
4jsp:getProperty
Inserts the property of a JavaBean into the output.
5jsp:forward
Forwards the requester to a new page.
6jsp:plugin
Generates browser-specific code that makes an OBJECT or EMBED tag for the Java plugin.
7jsp:element
Defines XML elements dynamically.
8jsp:attribute
Defines dynamically-defined XML element's attribute.
9jsp:body
Defines dynamically-defined XML element's body.
10jsp:text
Used to write template text in JSP pages and documents.
raja
Published on 20-Mar-2019 06:29:53
Advertisements