struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: struts2 equivalent of html:link tag?
Date Mon, 16 Apr 2007 21:21:34 GMT
--- Allen Gilliland <> wrote:
> > <s:url value="/ui/something.jsp"/>
> okay, but at that point there is no real reason to
> use the s:url tag at all 

If you're not dealing with contexts, perhaps not.

> <html:link forward="login">login page</html:link>
> and had this in your struts config file ...
> <global-forwards>
>    <forward name="login"
> path="/ui/login-redirect.jsp"/>
> </global-forwards>

In S1 my impression was that it was generally
recommended to direct all requests through actions to
avoid problems like this; that's one reason why the
ForwardAction and the forward attribute were
introduced: ending up with a link to a JSP is mostly
broken (IMO, anyway).

> does struts2 have any equivalent for that?

AFAIK not beyond what has already been shown.

If you're simply dispatching to a JSP or something
else the normal container dispatcher can handle, why
not just add the following to your struts config?

<action name="the/path">


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message