This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes Passing array from bean to JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Passing array from bean to JSP" Watch "Passing array from bean to JSP" New topic

Passing array from bean to JSP

Pramod Kulkarni

Joined: Oct 10, 2005
Posts: 2
I am new to JSP and am facing a problem to pass the values which i have defined in array in one bean and i want to pass this array in the JSP so that an drop-down list will be opened which will show the array values in them, so that one of them be selected and then passed to another bean. So that the value stored in that bean can be displayed using other JSP. I have figured out the configuration of bean but have no proper idea to pass an array from bean to JSP
Daniel Rhoades
Ranch Hand

Joined: Jun 30, 2004
Posts: 186
If your array is accessed via a bean accessor method, then simply add the bean to the request scope if you are pre-processing the request with a servlet, or if you just have a JSP page use the <jsp:useBean /> tag to create a new instance of the bean

Drinking more tea is the key...
I agree. Here's the link:
subject: Passing array from bean to JSP
Similar Threads
JSP Form values Not able to submit
Passing values to form bean string array
Passing Array to Popwindows
URGENT Help Needed ...!!
How to update Session variable with Form Data ?