Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 13th, 2008, 10:27 AM
Authorized User
 
Join Date: Feb 2005
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to IronStar
Default jsp:useBean and ArrayList

Hi,

I'm having a conceptual problem with jsp:useBean and ArrayLists. The useBean element creates a JavaBean and allows you to set the values of the instance variables. If you create a bean that is an ArrayList:

<jsp:useBean id="myList" scope="session" class="java.util.ArrayList"/>

is there a way to initialize myList with another ArrayList? You can't use setProperty because the values stored in the ArrayList are not a "property" that can be set.

Should ArrayLists not be created with useBean for this reason? If not, should you just create a variable with:

<c:set var="myList" value="<%= getMyArrayList() %>"/>

instead?

Thanks in advance for your help...
 
Old October 30th, 2008, 04:32 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

http://saloon.javaranch.com/cgi-bin/...&f=50&t=012135

check posts towards the end by "Merrill Higginson", might help

- Rakesh





Similar Threads
Thread Thread Starter Forum Replies Last Post
arraylist need to store data from jsp kotaiah JSP Basics 0 October 14th, 2006 01:57 AM
<jsp:useBean> action problem austinf JSP Basics 1 August 21st, 2006 04:23 PM
what wrong with thi code(Jsp:useBean) kousik Pro JSP 1 March 10th, 2006 06:21 AM
Please Help. mr_newreq.jsp:78: jsp:useBean can't f batken JSP Basics 0 February 22nd, 2006 09:56 PM
ArrayList kobystud C# 4 May 25th, 2004 02:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.