struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Nocera" <>
Subject RE: ActionForm scoping problems?
Date Mon, 25 Feb 2002 13:05:46 GMT
This could be off-base, but I think you'll have better results if you
change the case of your form-bean variable name from "BillingIDForm" to
"billingIDForm".  I think it may be using a static class BillingIDForm
and not creating an instance of the class.  Change all references on the
JSP page to "billingIDForm" and the <form-bean name="billingIDForm" ...

I know I had a similar problem a while back and it seemed that making
that change fixed it.

Robert Nocera
New England Open Solutions
"You supply the vision, we'll do the rest."

-----Original Message-----
From: [] 
Sent: Sunday, February 24, 2002 6:02 PM
To: Struts Users Mailing List
Subject: ActionForm scoping problems?

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
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
when I retrieve the variable form and cast it to: BillingIDForm, the
I set in the previous action is completely gone.   In this case, it's
to null which tells me that a "new" instance of the BillingIDForm was
created in-between my last action this action.....      I thought the
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
It does not appear to be the case...

Is there any other decent examples or explanations on when form
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.
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:

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

View raw message