Okay, I'll add a bit more since nobody else is.
>From what I understand, some of your scenarios are like this.  You have
ActionA to set up your Strings and ArrayLists etc to display FormA, and FormA
gets submitted to ActionB.  So, your config for these look something like:

<action path="/showForm" type="ActionA">
    <forward name="showForm" path=".formATile">
</action>

<action path="/submitForm" 
    type="ActionB"
    name="formA"
    input=".formATile"/>

To use request scope, you can either:
1) Leave your Strings/ArrayLists in session scope
2) Put them in application scope
3) Put them in request scope, then change your ActionB mapping to use ActionA
as input.  You'll need to make sure you don't reset FormA's values in ActionA
when it's for a redisplay.

I'm pretty sure this has been discussed in the list before, and that I've
typed the text for #3 before.
Anyway, choose one solution above (it's up to you and your reqts/situation)
and try it for one form.  If it works, try it for another form.

Hubert

--- Janice <[EMAIL PROTECTED]> wrote:
> Hi Gang,
> 
> I've been doing things badly... putting everything in session scope.  The
> good news is that everything works beautifully :)  But now that I've got
> 100+ actions I've decided to go put stuff into request scope.  The bad news
> is that everything grinds to a halt.
> 
> Here's an example of where I've added the scope to an action mapping:
> <--- snip --->
>     <action    path="/yearlyAllocation"
>                input=".yearlyAllocationForm"
>                parameter="action"
>                type="ca.bc.gov.srm.bart.actions.YearlyAllocationActions"
>                scope="request"
>                name="yearlyAllocationForm"
>                validate="false">
>       <forward name="form"      path=".yearlyAllocationForm" />
>       <forward name="list"      path=".yearlyAllocationList" />
>       <forward name="gotolist"  path="/yearlyAllocation.do?action=showList"
> />
>     </action>
> </--- snip --->
> Previously I'd left the scope line out.
> 
> So my now jsp page can't find my form goodies on the page.  It falls apart
> here:
> <--- snip --->
>       <html:select property="yearCode">
>         <html:optionsCollection property="years" label="yearFull"
> value="yearCode" />
>       </html:select>
> </--- snip --->
> with a NullPointerException.  But it did make it past here:
> <--- snip --->
> <html:form action="/yearlyAllocation?action=submitForm"
>       name="yearlyAllocationForm"
>       type="org.apache.struts.validator.DynaValidatorForm"
>       focus="yearCode">
> </--- snip --->
> which I guess I'm surprised at.
> 
> I'd love to put up all kinds of code, but I'm using DispatchActions, tiles,
> DynaValidatorForms, etc, so I'm not really sure where to start cutting and
> pasting.  If anyone has any requests for more info, I'd be happy to oblige.
> 
> Oh, this one looks important: in my method where I set up the form before
> passing it to the .jsp, I set up my form all pretty with lots of Strings
> and
> ArrayLists and then I do one of these:
> <--- snip --->
>       if ( "request".equals(mapping.getScope()) ) {
>         request.setAttribute(mapping.getAttribute(), form);
>       } else {
>         HttpSession session = request.getSession();
>         session.setAttribute(mapping.getAttribute(), form);
>       }
> </--- snip --->
> which I thought was designed to handle this.
> 
> So, to make a long story short, what else do I need to do to switch from
> putting all my form beans in session scope to putting them in request
> scope?
> Do I need to tell the .jsp page to look somewhere else or something?
> 
> Thanks very much in advance,
> Janice
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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

Reply via email to