I wasn't comfortable pulling in JSTL tags to do this (at any rate I couldn't
seem to reference the JSTL core, when I tried in my project), so I did the
following:
<%
response.sendRedirect((String)com.opensymphony.xwork2.ActionContext.getContext().getValueStack().findValue("url"));
%>
...where the action class has...
public String getUrl()
...to export the dynamically determined URL, which is therefore available in
the value stack and which we want the browser to redirect to.
I'm probably making a pig's ear of this, but I couldn't find a better way to
make the value stack accessible to "low level" JSP code, which is what I
believe needed to access the response object.
I guess there are some Maven2 dependencies I ought to add to my POM to be
able to access JSTL core tags. All of the obvious URIs don't seem to work
for me (wouldn't reference anything sensible in Eclipse). Having said that,
what I have works without JSTL core, which is perhaps a good thing?
mraible wrote:
>
> You could use the same thing we use in index.jsp:
>
> <c:redirect url="/mainMenu.html"/>
>
--
View this message in context:
http://www.nabble.com/simple-redirect-in-Struts2-from-index.jsp-tf4715019s2369.html#a13665546
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]