I think you're missing the point.  The right way to do what you're doing is
with the dispatcher.  You have your server side logic perform it's
calculations and ministrations, when it's done it returns a string telling
the "presentation side" what should happen next.  Which should be using the
dispatcher to dispatch your JSP to the browser.  If you're adamant about
keeping the two separate (which is not the "struts 2 way"), you will either
have to continue to redirect or chain, there really is no other way.  I
believe what you are really trying to accomplish is what the dispatcher is
doing.
  (*Chris*)

On Wed, Sep 26, 2012 at 11:08 AM, Fredrik Lindberg <[email protected]>wrote:

> Look, I already wrote why I would not want to use the chain result
> type. Also I did not write anything about redirect that you are
> quoting. I wrote "forward" and followed what was written here:
>
> http://struts.apache.org/2.1.6/docs/dispatcher-result.html
>
> Are you really trying to be helpful?
>
> / Fredrik Lindberg (2012-09-26).
>
> On Wed, Sep 26, 2012 at 8:42 PM, Chris Pratt <[email protected]>
> wrote:
> > I will correct you, because you are wrong.  The dispatch result type is
> the
> > direct streaming result type that processes JSP and streams the generated
> > HTML directly to the browser.  That is not the same as the "redirect"
> > result, which streams a 302 result code and a "location" header to the
> > browser.  If you are trying to make the result of one action the input to
> > another action without involving the browser, you'll need to use the
> > "chain" result.
> >   (*Chris*)
> >
> > On Wed, Sep 26, 2012 at 10:38 AM, Fredrik Lindberg <[email protected]
> >wrote:
> >
> >> Hi!
> >>
> >> Forward is, correct me if I am wrong, what you get when you use the
> >> dispatch result type, but as far as I have been able to tell you can
> >> only forward to a view, like e.g. a JSP. I want to however "forward"
> >> to another action without the round-trip of a redirect. In other
> >> words, I want to switch, based on the result of the first action,
> >> which action is being executed before the system determines which view
> >> to use.
> >>
> >> Yes, having to do some kind of interceptor for this seems like very
> >> complicated.
> >>
> >> / Fredrik Lindberg (2012-09-26).
> >>
> >> On Wed, Sep 26, 2012 at 7:41 PM, Dave Newton <[email protected]>
> >> wrote:
> >> > On Wed, Sep 26, 2012 at 12:30 PM, Fredrik Lindberg wrote:
> >> >
> >> >> I am looking for if there is any alternative to the redirect-action
> >> >> result type where it does not generate a browser redirect?
> >> >
> >> >
> >> > It's not clear to me what you want.
> >> >
> >> > Do you want to *forward* to another action? I've never tried it, but
> did
> >> > you try the normal dispatch result?
> >> >
> >> > Also why not send what the client wants right away?
> >> >
> >> >
> >> > Because it's a redirect?
> >> >
> >> >
> >> >> What I want is having control over what properties are
> >> >> passed on to the next action in the same way as for the redirects,
> but
> >> >> without the overhead. Can anyone help? =)
> >> >>
> >> >
> >> > I suppose you could configure the parameter filter interceptor for
> each
> >> > action, but ugh.
> >> >
> >> > Dave (2012-09-26... well that seemed redundant; does your email client
> >> not
> >> > show dates?)
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to