Win a copy of The Java Performance Companion this week in the Performance forum!
    Bookmark Topic Watch Topic
  • New Topic

Syntax useBean

 
naro pad
Ranch Hand
Posts: 58
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Report post to moderator
I want to make loop which it will creates beans but I don't know how the syntax is. I want to pass the 'i' to the id of the bean but I have syntax error

<% for(int i=0;i<=8;i++){%>
<jsp:useBean id=<%="book" +i%> class="beans.book" scope="request"/>

<%}%>

Can anyone provide me the right syntax?
Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64972
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please continue this discussion in the original post.
 
    Bookmark Topic Watch Topic
  • New Topic