When you use a form to set property values, take into account the scope of the components whose properties are being set. As a general rule, it is a good idea to use request-scoped components; this ensures that only one request at a time can set their properties.

If a form sets properties of components that are not request-scoped, you must ensure that multiple requests do not access the component at the same time. This is especially important for globally-scoped components, which are highly vulnerable to multiple simultaneous requests from different sessions; with a session-scoped component, multiple simultaneous requests occur only if the user submits the form twice in very rapid succession.

To ensure that multiple requests do not access the same component simultaneously, use the synchronized attribute in your form tag. With this attribute, the ATG platform locks the specified component before setting any properties, and releases the lock only after form submission is complete. Other form submissions can set the component’s properties only after the lock is released.

For example, the following dsp:form tag locks the Student_01 component during form submission:

   method="post" action="servbeantest.jsp" synchronized="/samples/Student_01"/>

Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices