Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL question

 
Zhixiong Pan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a simple question about the EL here,

<%
request.setAttribute("Two","2");
Integer One = new Integer(1);
%>

${One + 1}


Why the output is "1"?
 
S Vilish
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no defined attribute called "One" so it will be treated as zero in arithmatic operations.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic