Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

print ArrayList into JSP  RSS feed

 
Mauro Trevigno
Ranch Hand
Posts: 99
Java Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I recieve an ArrayList from a session:

and prints everything properly in the console.
US1299352 is not correct. Account is incorrect, Account ES1299352 is not correct. Account is incorrect.

I already use the following options to print element by elemetn but dosnt show in the page.



Because i was not successful to print i did the following:


But when i print using out

Works good, but is not following the rule with "\n", so not sure how to do this or print properly the ArrayList.

Some ideas?

:)

Thanks
-M
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using both scriptlets (obsolete) and the JSTL?
 
Mauro Trevigno
Ranch Hand
Posts: 99
Java Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Why are you using both scriptlets (obsolete) and the JSTL?



Sorry Bear, i just added so everyone can see the code using scriptlet and JSTL.

First I try with scriptlets and then with JSTL but any of these seems to work
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the JSTL is not working, then it is unlikely that "strings" has been correctly established as a scoped variable.
 
Ishan Pandya
Ranch Hand
Posts: 228
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you should use a <c:set> for setting up a page scope "strings" variable.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!