JavaSercer Pages A.3 Action Elements Actions are executed when the JSP page is requested by a client. They are inserted in a page using XML element syntax, and encapsulate functionality such as input validation using beans, database access, or passing control to another page. The JSP specification defines a few standard action elements, described in this section, and also includes a framework for developing custom action elements. An action element consists of a start tag (optionally with attributes), a body, and an end tag. Other elements can be nested in the body. Here’s an example: If the action element doesn’t have a body, a shorthand notation can be used in which the start tag ends with /> instead of >, as shown by the action in this example. The action element name and attribute names are case-sensitive. Some action attributes accept a request-time attribute value, using the JSP expression syntax: <% String headerPage = currentTemplateDir + "/header.jsp"; %> Plugin tag OBJECT or EMBED not supported by browser. A.3.2 The action passes the request processing control to another JSP page or servlet in the same web application. The execution of the current page is terminated, giving the target resource full control over the request. If any response content has been buffered when the action is executed, the buffer is cleared first. If the response has already been committed (i.e., partly sent to the browser), the forwarding fails with an IllegalStateException. The URI path information available through the implicit request object is adjusted to reflect the URI path information for the target resource. All other request information is left untouched, so the target resource has access to all the original parameters and headers passed with the request. Additional parameters can be passed to the target resource through elements in the element’s body. page 263
Note: If you are looking for cheap and inexpensive provider to host and run your tomcat application check professional tomcat hosting services
This entry was posted
on Monday, January 29th, 2007 at 7:32 pm and is filed under Java.
You can follow any responses to this entry through the RSS 2.0 feed.
Responses are currently closed, but you can trackback from your own site.