File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
It's not a secret anymore!