Re: NEVERMIND: Changing Request Parameters

2002-02-22 Thread Ted Husted

Phase Communcations wrote:
> I tried to set the reqest value by calling the FormBean and set it from the
> action. But, it doesn't carry over to the next Action. I can't find a way to
> change the request parameters. Please help.

The trick is to put a switch on your form bean to make it immutable.
This way the controller can't mess with it between actions. 


private boolean mutable = true;
public void setMutable(boolean mutable) {
this.mutable = mutable;
}
public boolean isMutable() {
return this.mutable;
}

public String whatever = null;
public void setWhatever(String whatever) {
if (isMutable()) this.whatever = whatever;
}
public String getWhatever() {
return this.whatever;
}

Then be sure that reset uses the setters (and doesn't clear mutable).


-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services

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




Re: NEVERMIND: Changing Request Parameters

2002-02-22 Thread Jin Bal

Equally cheesy would be  to set request attributes and get the receiving
action to check the attributes before checking the req params.  It's dirty I
know, but it may be slightly preferable to constructing query strings on the
server and creating a new request...

Just a thought.

HTH
Jin
- Original Message -
From: "Phase Communcations" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 22, 2002 12:16 PM
Subject: NEVERMIND: Changing Request Parameters


> A little more research and I find that it is not possible and that I need
to
> rebuild the and redirect. Cheezy.
>
> -Original Message-
> From: Phase Communcations [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 22, 2002 5:08 AM
> To: Struts Users Mailing List
> Subject: Changing Request Parameters
>
>
> I am forwarding from one Action to Another. I need to tweak the request
> parameters. Is there a way to do this?
>
> I tried to set the reqest value by calling the FormBean and set it from
the
> action. But, it doesn't carry over to the next Action. I can't find a way
to
> change the request parameters. Please help.
>
> I saw some discussion on the archive. But, is pretty aimless and not very
> clear.
>
> I am running Servlet 2.2 so don't tell me about getParameterMap().
>
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> [EMAIL PROTECTED]
> http://www.phase.ws
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




NEVERMIND: Changing Request Parameters

2002-02-22 Thread Phase Communcations

A little more research and I find that it is not possible and that I need to
rebuild the and redirect. Cheezy.

-Original Message-
From: Phase Communcations [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 5:08 AM
To: Struts Users Mailing List
Subject: Changing Request Parameters


I am forwarding from one Action to Another. I need to tweak the request
parameters. Is there a way to do this?

I tried to set the reqest value by calling the FormBean and set it from the
action. But, it doesn't carry over to the next Action. I can't find a way to
change the request parameters. Please help.

I saw some discussion on the archive. But, is pretty aimless and not very
clear.

I am running Servlet 2.2 so don't tell me about getParameterMap().

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



--
To unsubscribe, e-mail:

For additional commands, e-mail:




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