This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes declaring an arraylist or array type hidden variable in a form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "declaring an arraylist or array type hidden variable in a form" Watch "declaring an arraylist or array type hidden variable in a form" New topic
Author

declaring an arraylist or array type hidden variable in a form

rammie singh
Ranch Hand

Joined: Mar 26, 2009
Posts: 116
can any body tell me how to declare an input type hidden variable of type arraylist in a form in a jsp page.

and how can i asssign values to that arraylist through javascript.

Thanks and Regards.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

There is no arraylist control in HTML. You just need to use the regular, everyday controls.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
What good is a hidden arraylist in a form?

Are you trying to send a list of string values in a single hidden variable? If so, consider concatenating the values together with comma separators - the jsp/servlet side will get a single long string you can take apart into the individual values.

Bill
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: declaring an arraylist or array type hidden variable in a form
 
Similar Threads
sendRedirect fails to post data along with url if the data is too large
Passing an arrayList of JavaBean Object as hidden variables
JSP Help-simple question
Array lists syntax in jsp
Passing objects via form submit