| Author |
EL doubt?
|
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
Guys, Any reason as to why the following does not work? <% request.setAttribute( "anAttribute", ${aValueFromEL} ); %>
|
SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
|
|
|
Expressions cannot be used in scriptlet. Scriptlets are pure java. Put the same in a simple java file and try to compile. You'll get a compilation error.
|
[My Blog]
All roads lead to JavaRanch
|
 |
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
|
So the point is Expression Language cannot be used in scriptlets!
|
 |
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
|
Is there any reverse situation?
|
 |
nitin pai
Ranch Hand
Joined: May 30, 2006
Posts: 185
|
|
I think you havent got the whole point of why EL was formed. It was formed to avoid java scriptlets in a JSP page for web page designers. The reverse is not true since you are not going to design a web page using java. Its like a wrapper over the underlying scriptlet for ease of use.
|
|
 |
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
|
I was just vague in my thoughts!
|
 |
 |
|
|
subject: EL doubt?
|
|
|