Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Incomplete
-
1.1 RC1
-
None
-
None
-
Operating System: Windows XP
Platform: PC
-
36762
Description
In my struts-config.xml file, I have a form bean defined as follows:
<form-bean name="detailedSrvPeriodForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="employeeId" type="java.lang.String" />
<form-property name="retirementScenarioId" type="java.lang.String" />
<form-property name="serviceHistoryEntered" type="java.lang.String" />
<form-property name="detailedServiceHistoryId" type="java.lang.String" />
<form-property name="service" type="com.frb.bean.DetailedServicePeriod
[]" />
<form-property name="tmpService" type="com.frb.bean.DetailedServicePeriod
[]" />
</form-bean>
Note the two properties that are arrays of other beans.
I have an Action that maps the Form to a page. I navigate to the page, where
the populated form is displayed. However, if the user submits the page after
the session times out, and if the form had at least one item in one of the
arrays, the BeanUtils.populate call in RequestUtils.populate will throw an
ArrayIndexOutOfBoundsException. Perhaps because the form gets cleared due to
the session timeout, but the new form expects to see at least one item in the
array?
Due to the thrown exception in BeanUtils.populate, the user is brought to a
blank page, with no indication of an error.