I need to pass a list of accounts from JSP to servlet. In my Jsp a list box containing a list of values is present. Multiple selection is allowed. When multiple projects are selected, how do i pass this as a parameter to my servlet?? Help!
David Gilmore
Greenhorn
Joined: Jul 19, 2002
Posts: 9
posted
0
Can you not just put them in an arrayList and do request.setAttribute("accounts", your_arraylist)? David
There are 10 types of people in this world - those who understand binary and those who don't.
Dave Vick
Ranch Hand
Joined: May 10, 2001
Posts: 3244
posted
0
The JSP presents a form that has a list box that allows multiple selections? The form on the JSP has an action that directs it to the servelt? In the servlet just use the getParameterValues( ) method of the Request object. It returns an array of strings that are all of the values of any multi-valued parameters sent.
Dave
S Srikanth
Greenhorn
Joined: Sep 09, 2002
Posts: 14
posted
0
Hi smita , Use "getParameterValues" to get multiple values from a jsp page Srikanth
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.