*
The moose likes Servlets and the fly likes passing variable. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "passing variable." Watch "passing variable." New topic
Author

passing variable.

payal sharma
Ranch Hand

Joined: Oct 04, 2000
Posts: 57
How can I pass vector variable from a bean to a jsp page.
please give some advice about doing this.
payal
payal sharma
Ranch Hand

Joined: Oct 04, 2000
Posts: 57
Got the answer .I will use usebean in jsp and write a method in bean that will return variable value.
I have got 14 rows in each resultset and 50 values in each row.
I am getting all values of from resultset in to array.And then adding all the array to a vector. And then returning the vector with a method.
Is this approach is ok .
payal
Manjunath Reddy
Ranch Hand

Joined: Jul 26, 2001
Posts: 60
If i were you, i would have rather encapsulated the data from resultset into a high level class instead of low-level data structures.
Better to maintain and easier to use in JSP.
cheers,
mpr
payal sharma
Ranch Hand

Joined: Oct 04, 2000
Posts: 57
dear manjunath,
I was also told by other person that if i use object class and store the whole resultset in it then it would be easier.If possible how can i work on object class as i have to extract each field at last.
thanks in advance
payal
Manjunath Reddy
Ranch Hand

Joined: Jul 26, 2001
Posts: 60
payal,
If you can illustrate what are the fields in the resultset that u need to extract..maybe i can add my 2 cents.
cheers,
mpr
 
Don't get me started about those stupid light bulbs.
 
subject: passing variable.