| Author |
Using variable in expression language
|
Adri Smith
Ranch Hand
Joined: Jun 07, 2004
Posts: 76
|
|
Does anyone know if we can use variables defined in a scriptlet in a an expression language ? For example, I defined the variable var as following: <%! String var = "a variable"; %> Then i try to test if this variable is equal to "a variable" ${var eq "a variable"} this returns false, i guess the evalaution of the variable var returns null because EL are only looking for variables in any scopes but I am not sure ! That is why I am asking you this simple question. If there is a special way to access those variable, let me know. Thanks you in advance Tiggy
|
 |
Sivasundaram Umapathy
Ranch Hand
Joined: Aug 10, 2002
Posts: 360
|
|
Only implicit variables and variables defined in one of page,request,session or application scopes are available to EL. So there is no special way to access these varuables unless you add them to some scope.
|
Siva
Co-Author - SCMAD Exam Guide - ISBN:9780070077881
Author - Java certification success, Part 4: SCEA
|
 |
Adri Smith
Ranch Hand
Joined: Jun 07, 2004
Posts: 76
|
|
|
Thanks a lot for your response, that helps me a lot in my preparation of the certification SCWCD 1.4
|
 |
 |
|
|
subject: Using variable in expression language
|
|
|