struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale Newfield <>
Subject Re: [struts] struts result going to a current page
Date Sun, 17 Feb 2008 06:00:39 GMT
Srinivas Surapaneni wrote:
> To be more specific, Here is we can do in Beehive Pageflow which is based on
> struts 1.x

Since I've never used Beehive, and I don't feel like digging through 
it's internals to figure out how it determines what the "previousPage" 
was, or how it forwards there, I can't tell you exactly what this does.

In general, though, what I'm telling you is that you have two choices. 
You can either have your global result of type httpheader and simply 
return 204 so the request completes but the person is left on whatever 
page they were previously viewing, or you can look in the request to see 
what the "referer" page is, and if set, you can send a redirect to it.

   <result name="noAnswer" type="httpheader">
     <param name="status">204</param>
   <result name="redirectToReferrer" type="redirect">
     <param name="location">${#request.getHeader("Referer")}</param>

   <exception-mapping exception="recoverableExceptionBaseClass" 


P.S.:  If that request.getHeader bit doesn't work, it's because I think 
the OGNL #request object might be the request namespace rather than the 
actual HttpServletRequest object.  I think that's a standard stumbling 
block, but it's late and I don't recall the standard solution -- can 
someone else please chime in?

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

View raw message