Step 16- JSP Action Tags

Action TagDescriptionExample
<jsp:include>Includes the content of another resource within the current JSP page.<jsp:include page="header.jsp" />
<jsp:forward>Forwards the request to another resource.<jsp:forward page="login.jsp" />
<jsp:param>Adds a parameter to the request when used in conjunction with <jsp:include> or <jsp:forward>.<jsp:param name="id" value="123" />
<jsp:useBean>Finds or instantiates a JavaBean and makes it available to the JSP page.<jsp:useBean id="user" scope="session" class="com.example.User" />
<jsp:setProperty>Sets the property of a JavaBean.<jsp:setProperty name="user" property="username" value="johndoe" />
<jsp:getProperty>Gets the property of a JavaBean and prints it to the response.<jsp:getProperty name="user" property="username" />
<jsp:plugin>Generates HTML and JavaScript to make sure that a browser has the Java plugin installed and directs the browser to download the plugin if necessary.<jsp:plugin type="applet" code="MyApplet.class" width="200" height="100" />
<jsp:element>Defines a XML element and its content.<jsp:element name="customer" > <jsp:attribute name="id" >123</jsp:attribute> John Doe </jsp:element>
<jsp:attribute>Defines a XML attribute<jsp:attribute name="id" >123</jsp:attribute>
<jsp:body>Defines the body content of a XML element<jsp:element name="customer"> <jsp:attribute name="id" >123</jsp:attribute> <jsp:body>John Doe</jsp:body> </jsp:element>
<jsp:fallback>Defines a fallback mechanism for browsers that don’t support the plugin<jsp:fallback>Sorry, your browser doesn't support the required plugin. </jsp:fallback>
<jsp:output>Defines the version and encoding of the JSP page<jsp:output doctype-root-element="html" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/loose.dtd" version="1.0" encoding="UTF-8" />