tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Beans and Forms
Date Mon, 24 Sep 2001 13:32:06 GMT
I have a series of tabs I created in a window that holds data for an
application. When the tabs are selected the data on the current form is
submitted to a servlet where beans save the data.  Once the data is stored
in the bean then the data corresponding to the selected tab is loaded into
the form from a differnet bean (the forms are on frames).

Without getting into too many details I am having a problem w/one specific
case where I need to submit two forms, and update two beans before I load
the data from the bean into the new form.

Here is what is happening.
1.   A JavaScript function submits one form where the action is a servlet.
The servlet then calls a bean, which is updated with the data from the
2.   A second form is then submitted using the same servlet, which updates
a different bean with the data from the form.
3.   After the second form is submitted the servlet forwards a JSP to that
form which loads the data from a third bean into it.

What is happening is that the first form I am submitting is not updating
the bean.  I can get it to update by putting an alert box between the
submittal of the first form and the second or by putting a large while loop
between the two submittals.  However, left to themselves I cannot get the
first form to update.  It also updates when it is not submitted after the
second form.

What is the problem?  I suspect it has something to do with
synchronization. If this is the case could someone give me any direction?

The beans are also being stored in the session object if that helps and
each bean is a separate object.

Thanks in advance


View raw message