• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing array from bean to JSP

 
Pramod Kulkarni
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic