• Post Reply Bookmark Topic Watch Topic
  • New Topic

small EL question  RSS feed

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlet code:


JSP code

${requestScope[integer]}

what will be printed?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You probably want to do ${requestScope['integer']}
requestScope[integer] is same as requestScope[2]
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Satou kurinosuke:
You probably want to do ${requestScope['integer']}
requestScope[integer] is same as requestScope[2]


Yes, so nothing will be printed.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!