Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to pass arraylist from jsp to java bean

 
vina kum
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers
I am a new bie to java currently i am developing a jsp page in which i have a javabean linked to it my problem is in my jsp i have a arraylist variable of string type i want to pass the arraylist values to javabean file please give me solution how to pass the arraylist variable from jsp to javabean.
Thanks in advance.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vina kum wrote:
in my jsp i have a arraylist variable of string type i want to pass the arraylist values to javabean file how to pass the arraylist variable from jsp to javabean.


pass the list as parameter of the method of a class . Good practice is that Creating arrayList should done in servlet and reading of the list should done on jsp using jstl/EL

Note: scriptlet is discourage in jsp
 
vina kum
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply i am sending my jsp and javabean file

This is some part of my jsp code i am using and my javabean is
please tell me how to get the whole disp arraylist values to javabean file.
Thanks in advance
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what error you are getting?
 
vina kum
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thanks for your reply my problem is my arraylist disp is sending only first retrived value to javabean and the rest of the values are not getting. please suggest me how to get the whole arraylist values.
Thjanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64685
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are just starting out with JSP you should learn good habits right off the bat and not put any Java code in your JSPs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic