struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject ActionForm scoping problems?
Date Sun, 24 Feb 2002 23:01:56 GMT

I have an action as such:
.... Rest omitted to save space
and the form definition of:

<form-bean name="BillingIDForm" type="express.BillingIDForm" scope

And I have an entry point JSP which invokes actions and such....

I have a post
My BillingIDActionForm action simply loads data into the BillingIDForm and
saves an attribute in it.

The BillingIDActionForm::perform() then
calls return (mapping.findForward("success"));

Where success maps to:
<forward name="success" path="/BillIDForm.jsp"/>

The "submit" for BillIDForm.jsp is <html:form action
where handleBillingIDSubmit maps to:

In the perform method for: BillingIDFormSubmitAction,
public ActionForward perform(ActionMapping mapping,      ActionForm form,
when I retrieve the variable form and cast it to: BillingIDForm, the value
I set in the previous action is completely gone.   In this case, it's back
to null which tells me that a "new" instance of the BillingIDForm was
created in-between my last action this action.....      I thought the whole
purpose of "request scope" was to retain the same instance of a form or
bean all the way thru from the entry request to the end of the request....
It does not appear to be the case...

Is there any other decent examples or explanations on when form variables
descope themselves between requests?    If I go and change all of my
"scope" attributes in the struts.config.xml to "session", my application
works fine.    Trouble is that I want it to work with "request" scope.    I
think I am definitely missing a key point here somewhere!

I'm sorry, but I'm just not getting it  :-)


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

View raw message