This topic describes how to access variables in the various data binding context objects such as pageFlow, actionForm, and container from a JSP scriptlet and JavaScript. To learn more about data binding contexts, including the scope of the various contexts and how to add data to these contexts, see Using Data Binding in Page Flows.
To Access Data Binding Contexts in Scriptlet
<% String value = request.getParameter("User_Index"); %>
<% String value = (String)
request.getAttribute("AttributeKey"); %>
In this example, the object (value) corresponding to the AttributeKey key is retrieved.
To Access Data Binding Context in JavaScript
A common use of JavaScript in which dynamic data needs to be accessed is client-side form validation. Here the user's input in form fields is checked before data is passed back to the server, possibly for server-side validation. To learn more about how to access data in the actionForm object in JavaScript, see Validating User Input.