• Post Reply Bookmark Topic Watch Topic
  • New Topic

How EL works?

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
${person.name}

How does container know, where (which scope) to find 'person'??
And other thing also...??

Thanks.

 
geeta lalchandani
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the search for the 'person' is made in all the scopes.. in the order
page
request
session
application

and the object person if sound.. its attributes (name) are evaluated.
 
Stefan Evans
Bartender
Posts: 1822
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In other words it uses the method findAttribute(String name) to do the lookup.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by geetu lalchandani:
the search for the 'person' is made in all the scopes.. in the order
page
request
session
application

and the object person if sound.. its attributes (name) are evaluated.


Thanks Geetu and Stefan.
Is there any way to tell container, "search in this particular scope only"?

Thanks.

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps if you read the chapter on the EL in the JSP Specification, all would be clear.
 
Stefan Evans
Bartender
Posts: 1822
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alternatively, here is a quick reference cheat-sheet: http://java.sun.com/products/jsp/syntax/2.0/syntaxref207.html#1010662
Take a look at the implicit variables: pageScope, requestScope, sessionScope, applicationScope...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!