Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean:define help

 
Alan Hermin
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all... i want to convert this script to struts <bean efine>

But this does not work.........
can any one help me...............
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to make this list available to Struts tags, you need to put it in a "scope" (application, session, request, or page). I would not use a bean:define tag for this. I'd use the following statement to put the list in page scope:

<% pageContext.setAttribute("list", list); %>

Once you have done this, you can use list in any struts tags. For example:

<logic:iterate id="element" name="list">
<bean:write name="element"/>
</logic:iterate>
[ July 12, 2006: Message edited by: Merrill Higginson ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic