what I mean is since in the action I already define the result, which has the jsp name, if struts2 provide a way that I can get this info, then I can set it to ${input} easily.
E.g if there is something like xxxx.getResult("page1") and it give me the value "/WEB-INF/pages/page1.jsp" then this solve my problem, so I don't need to store another hidden value in the jsp. <action name="MyAction" class="MyAction"> <result name="page1">/WEB-INF/pages/page1.jsp</result> <result name="page2">/WEB-INF/pages/page2.jsp</result> <result name="input">${input}</result> </action> regards Louis ________________________________ From: Greg Lindholm <greg.lindh...@gmail.com> To: Struts Users Mailing List <user@struts.apache.org> Sent: Wednesday, July 8, 2009 5:52:25 PM Subject: Re: dynamic return when validation failed The referer header will contain the URL of the last request, which will be the action URL not the jsp page that rendered the result. So this wouldn't help the OP if I understood his problem. On Wed, Jul 8, 2009 at 11:50 AM, Dale Newfield <d...@newfield.org> wrote: > Greg Lindholm wrote: > >> There is nothing in a request that will tell you which page you came from >> unless you put it there (as with the hidden parameter). >> > > While this is mostly true, it's not 100% true. HTTP has a "referer" (yes, > misspelled in the spec) field so most of the time you can know from where a > link came or a post was posted (assuming this value is provided by the > browser). Note, all it provides is the URL of that previous page, so if > that's not specific enough you're still SOL. > > -Dale > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >