my dog learned polymorphism*
The moose likes JSP and the fly likes how to pass arraylist from jsp to java bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "how to pass arraylist from jsp to java bean" Watch "how to pass arraylist from jsp to java bean" New topic
Author

how to pass arraylist from jsp to java bean

vina kum
Greenhorn

Joined: Jun 24, 2009
Posts: 21
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

Joined: Jan 28, 2008
Posts: 5575

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

Joined: Jun 24, 2009
Posts: 21
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

Joined: Jan 28, 2008
Posts: 5575

what error you are getting?
vina kum
Greenhorn

Joined: Jun 24, 2009
Posts: 21
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

Joined: Jan 10, 2002
Posts: 61309
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to pass arraylist from jsp to java bean