• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Doubt In EL Operators

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic