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 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 Murach's Java Servlets and JSP this week in the Servlets 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing variable.
 
Similar Threads
WA #1.....word association
regard on k&b book
Home loans in India - fixed or floating ?
Running two threads
Dont declare global variables in Servlet