3.6. Scope searching algorithm
Prev | 3. Expression Language (EL) | Next

## 3.6. Scope searching algorithm

When assigning a variable in one of the flow scopes, referencing that scope is required. For example:

    <set name="requestScope.hotelId" value="requestParameters.id" type="long" />

When simply accessing a variable in one of the scopes, referencing the scope is optional. For example:

    <evaluate expression="entityManager.persist(booking)" />

If no scope is specified, like in the use of `booking` above, a scope searching algorithm will be employed. The algorithm will look in request, flash, view, flow, and conversation scope for the variable. If no such variable is found, an `EvaluationException` will be thrown.

Prev | Up | Next
3.5. Special EL variables | Home | 4. Rendering views