You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Michael P. Jones" <mi...@boxerlearning.com> on 2002/10/31 00:12:13 UTC

Forward a modified Request out of an Action

Hello-

This is kind of a weird question but here goes....

I have an Action class that takes some values from the session puts these
parameters into a RequestWrapper object (that I wrote so I can get and set
request params) under different names, then forwards this modified
RequestWrapper object off to another servlet in a different webapp.

Right now I have my action class forward the modified request off to the 
other webapp however this just kind of leaves my Action class hanging 
there in the open. 

So is there a cleaner more Struts way to handle this situation?

I need to:
- forward to a different webapp
- forward a modified request object


Thanks-
Michael

-- 
+--------------------------------------------+
| Michael P Jones             (503) 772-5180 |
|                                            |
| Boxerlearning   michaelj@boxerlearning.com |
+--------------------------------------------+
| Remember. when you have unsafe email with  |
| someone, you're having email with all the  |
| other people that person's had unsafe email|
| with...                                    |
+--------------------------------------------+


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Forward a modified Request out of an Action

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 30 Oct 2002, Michael P. Jones wrote:

> Date: Wed, 30 Oct 2002 18:12:13 -0500 (EST)
> From: Michael P. Jones <mi...@boxerlearning.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: Forward a modified Request out of an Action
>
> Hello-
>
> This is kind of a weird question but here goes....
>
> I have an Action class that takes some values from the session puts these
> parameters into a RequestWrapper object (that I wrote so I can get and set
> request params) under different names, then forwards this modified
> RequestWrapper object off to another servlet in a different webapp.
>
> Right now I have my action class forward the modified request off to the
> other webapp however this just kind of leaves my Action class hanging
> there in the open.
>
> So is there a cleaner more Struts way to handle this situation?
>
> I need to:
> - forward to a different webapp
> - forward a modified request object
>

If the request wrapper is getting created inside your Action, the only way
to pass it to the other webapp is to do the RequestDispatcher call
yourself in the Action.  When this call ultimately returns, your Action
should return null to the controller servlet, to indicate that the
response has already been created and no further processing is required.

>
> Thanks-
> Michael
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>