• Post Reply Bookmark Topic Watch Topic
  • New Topic

Mock Question

 
Swati Udas
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%int i = 1;
int j =2;%>

${i < j}
${1 lt 2}

the expected output is False/true
the first false is due to i and j not being accesible..Why are therse variables not accesible in EL ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are therse variables not accesible in EL ?

These are Java variables, local to the _jspService method of the JSP. They are not accessible from EL, as EL can only access scoped variables.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!