O'Reilly logo

Struts Kick Start by Kevin Bedell, James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Struts Logic Tags to Transfer Control

Sometimes you need to transfer control to another page inside the current application or to an arbitrary URI entirely outside the application. Two tags in the logic library are designed to enable you to do this.

The logic:forward Tag

The forward tag causes a transfer of control using a global ActionForward defined in the Struts configuration file. It takes a single attribute, name, which is the name of the forward. For example:

<logic:forward name="badlogin"/>

The logic:redirect Tag

On its surface, the redirect tag seems complicated until you realize that all the attributes are the same as their namesakes in the <html:link> tag. The only difference is that whereas the link tag comes into ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required