How to access bean class attribute through expression language?

Suppose a bean class Person(having name and city) is set in the request scope.
In the servlet:
To get the name of the person,
${} in this case you do not care about what scope the person is in. All you need to care about is that only one person attribute is there (in all scopes).
But if the person attribute is in session scope and also in request scope then there will be naming conflict in above method.
So you can use
${} for request scope and
${} for session scope.

No comments:

Post a Comment