• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

c:set target - EL expression or scripting expression

 
Jerry Bustamente
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would appreciate some help.

On page 446 of HFSP in the BANG box at the bottom of the page it states that the target attribute, "... needs to resolve to the REAL THING. That means an EL expression or a scripting expression (<%= %> , ...".

I understand how an EL expression can be a "REAL THING" but not how
<%= %> can evalute to a "REAL THING".

Can someone help me understand?

Thank you.

Sincerely,

Jerry B.
 
MI Mohammed
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jerry,
What does EL expression represent and what does it return, is the question ? e.g let say i have a Foo class with

setName(String name)
String getName()
Foo f = new Foo();
f.setName("Jerry"}
request.setAttribute("foo",f)

then, when i do this,

${foo.name}

ok, this returns the real value of Foo object's getName() using foo attribute. So it's a reference to the real object. But when you talk of
EL implicit Objects, they are mapped to somethings, like the ....Scope,
the represent attribute bind to particuler scopes and not the object itself.
thats why you have the pageContext, that allow you access to the real objects.
So for the exam, just know that, el expressions are references to the
real objects except those explicit object less pageContext.
Am sorry, if it sound confusing, just trying to break real down.
Hope, it helps.


SCJA SCJP SCWCD
 
Jerry Bustamente
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for taking the time for your kind reply. It is now clear.

Sincerely,

Jerry Bustamente
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic