Struts <logic:redirect> Tag

The <logic:redirect> tag renders an HTTP Redirect. It Performs an HttpServletResponse.sendRedirect() call to the hyperlink specified by the attributes to this tag. URL rewriting will be applied automatically, to maintain session state in the absence of cookies.

The base URL for this redirect is calculated based on which of the following attributes you specify (you must specify exactly one of them):

  • forward – Use the value of this attribute as the name of a global ActionForward to be looked up, and use the module-relative or context-relative URI found there.
  • href – Use the value of this attribute unchanged.
  • page – Use the value of this attribute as an module-relative URI, and generate a server-relative URI by including the context path.
<%@taglib uri="" prefix="logic"%>
<logic:redirect name="yourpage" />


No comments yet.

Leave a Reply