Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL and Scriptlet

 
Micheal John
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we declare the variable in EL? Is't possible to do all the operations done by scriptlet (expression, declaration and scriptlet) in EL?

I know the expression can be done at EL:

For Example:
<%! String str = "Hello"; %> // for this???
<% request.setAttribute("hi",str); %> //<c:set...>
<%= request.getAttribute("hi"); %> // ${}

Whether there will be only one uri per tld file?
[ January 10, 2007: Message edited by: Micheal John ]
 
Sanjeev Singh
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%! String str = "Hello"; %> // for this???

I dont think you can write a EL to get the value of str!
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use c:set with "page" scope.
 
Sanjeev Singh
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Satou,
You are right.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic