wood burning stoves*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes  ArrayList in jsp:useBean.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark " ArrayList in jsp:useBean.." Watch " ArrayList in jsp:useBean.." New topic
Author

ArrayList in jsp:useBean..

Sami Sayeed
Ranch Hand

Joined: Oct 05, 2004
Posts: 39
Hi All,

I have the following code.

<jsp:useBean id="names" class="java.util.ArrayList"/>

How can I populate the arraylist using jsp:setProperty , or any other way without using scripting.

cheers
Sami
Shiang Wang
Ranch Hand

Joined: Jun 20, 2003
Posts: 96
The only way I can think of is custom tag. I thought of using core jstl <c:forEach> and <c:set>, but I haven't figured out how to refer to the item of the list in the loop.

Shiang


SCBCD, SCWCD, SCJP
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: ArrayList in jsp:useBean..