Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 Java 8 in Action this week in the Java 8 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: 60077
    
  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: 12682
    
    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


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: declaring an arraylist or array type hidden variable in a form
 
Similar Threads
JSP Help-simple question
Passing objects via form submit
Array lists syntax in jsp
sendRedirect fails to post data along with url if the data is too large
Passing an arrayList of JavaBean Object as hidden variables