struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Galbreath, Mark" <Galbre...@tessco.com>
Subject RE: Form Bean scope
Date Wed, 24 Apr 2002 15:04:07 GMT
Declare the bean in session scope inside your action mappings like so:

<action mappings>
  <action path="/customerInfo"
          type="com.tessco.web.action.CustomerInfoAction" 
          name="EditCustomerForm"
          scope="session"
          validate="true">
    <forward name="success" path="/checkout/customerInfo.jsp" />
    <forward name="error" path="/checkout/customer_test.jsp" />
  </action>
</action mappings>

Mark

-----Original Message-----
From: Bryan P. Glennon [mailto:bryan@bpgc.com]
Sent: Wednesday, April 24, 2002 10:51 AM
To: struts-user@jakarta.apache.org
Subject: Form Bean scope


I must be missing something here...I have a form bean and an action. When
the
action is invoked, the bean gets instantiated and I see it's validate method
get called. So far, so good. When the action method ends and forwards to the
actual JSP page that will display the form, the form bean gets
re-instantiated, losing all the changes that I made to it in the action
method. It seems like it should all be in the same request, since the action
forward happens at the server side, not back at the browser.

Any help will be greatly appreciated.

Thanks,
Bryan

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message