This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt In EL Operators  RSS feed

 
Bennet Xavier
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%
String name="Example";
%>

${requestScope.Example}<br>
<%=name%><br>
${'Example' eq '<%=name%>'}<br>
${requestScope.Example eq '<%=name%>'}<br>

Assume that Example is a attribute with request scope which has value "Example" of type (String)

EL displaying false for this...

what might be the problem.

Thanks In Advance
[ July 03, 2008: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't mix the EL and scriptlets like that.
 
Bennet Xavier
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, thank you very much.

Please dont mistake me asking the follwing question.

Is that mentioned anywhere in the spec.

If its wrong to use that then why do they allow that type of syntax.

Its working, and its showing wrong answer.

Do reply...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bennet Xavier:
If its wrong to use that then why do they allow that type of syntax.
It's not allowed. But it's just treating the content of your strings as text and not processing it.

Its working, and its showing wrong answer.
So that means it's not working.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!