Passing an arrayList of JavaBean Object as hidden variables
rammie singh
Ranch Hand
Joined: Mar 26, 2009
Posts: 116
posted
0
Hi every body...
i have a JSP page..where i get an ArrayList of objects. These objects are of type javabean type...say of class CapacityReqdBean.java.
Now my requirement is that i want to pass this arraylist to servlet....but don't know how to do it.
can i pass it through hidden variable .
i am not in a position to use session..because on jsp page i would be having different radio buttons....and each button would be representing an arrayList.
Finally on click of a radio button....that corresponding arrayList has to passed to the servlet where it would be passed to a function.
Browsers only send strings. You can serialize/de-serialize somehow, or send IDs and re-create on the server side somehow, but the browser will send only strings back to the server.
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12267
1
posted
0
The Servlet API provides the session for passing references to objects to various servlets and JSP within the same web application.
This is all very basic stuff, have your read a tutorial on the servlet API?
Hidden variables are used in HTML pages to attach name-value pairs of strings to HTML form submission.
Hi william
actually i didn't want to use session.
But still can you mention which servlet API is used for this purpose.....may be i can get the result.