Keng Onn,

If you just want the "groupId" and "action" variables, you could always put
them in session scope, perform a forward with redirect="true", then read the
groupId and action from the session scope in the new action.  Just be sure
to remove those variables from session scope IF you don't need them anymore.

Regards,
David, an Caucasian with an English name :)

-----Original Message-----
From: Keng Onn [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 27, 2005 11:15 PM
To: user@struts.apache.org
Subject: Re: user Digest 24 Mar 2005 14:53:20 -0000 Issue 5708


Hi David,

Thanks for your advice :) - I think I now know what's happening.

I understand what you mean by suggesting that I add the request="true"
attribute to the forward, but it's actually the intention of the
original author to use the "groupId" and "action" variables that are
passed to the second action to initialise the presentation JSP page that
is presented to the user - so that the user can edit the pre-populated
fields for his contact group.

Thanks again for your help! Really didn't expect an answer so fast... :)
[I'm kinda new to Struts - just started to pick it up ard 2nd week Jan,
and It's my first time posting to this mailing list.]

Cheers,
Keng Onn. (not "Ken" btw; I'm Asian and don't have an English name :) )

Ken,

>> Am I missing something?
>
>

You are indeed missing something.   Your configuration shows ACTION
CHAINING.  That has complications.  The Struts framework is internally
called and EVERY step in the RequestProcessor class is performed AGAIN using
the same data in the buffer (i.e. whatever came in with the POST or GET to
"/contactgroup.do").  THAT is why your "groupId" and "action" fields are
populated with the same data - the client never got a message to ask for
"/editcontactgroup.do" because you bypassed the client and had the framework
perform all of this behind the scenes, INTERNALLY to the webapp.

If you wish to LOSE all of that data and start fresh, I recommend you change
your forward to:

<forward name="edit" path="editcontactgroup.do" redirect="true" />

The redirect="true" sends an HTTP redirect back to the client's browser
resulting in a brand new request (and obviously a new/blank request scope).

Regards,
David ([EMAIL PROTECTED])


---------------------------------------------------------------------
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