• Post Reply Bookmark Topic Watch Topic
  • New Topic

forEach prints Address Location  RSS feed

 
Soumya Manjunath
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I populate a List in my servlet and iterate over it in my JSP using the forEach tag. It prints the value of the address location
instead of the content in the List. Below is the code snippet. Please let me know what I'm missing.


I set it in the session variable. In the JSP I get this attribute and iterate over it


and it prints
javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects$7@caba7f
5 times. (List contains 5 items)
It is the same value for every td element.

Please let me know how to correct it.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"header" is an implicit object used by EL. Rename your variable to something else.
 
Soumya Manjunath
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Christophe. I changed the variable name and it works now
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!