Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 22nd, 2007, 10:16 PM
Registered User
Join Date: Jul 2007
Location: KUALA LUMPUR, SELANGOR, Malaysia.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Is it possible to store "SET" values to Vector ?

     The below is the "ActionClass" from which i am getting values from "FORMBEAN" i am setting those value into the "jsp" page successfully. WHAT I NEED NOW IS, IS IT POSSIBLE TO STORE THOSE VALUES INTO SOME VECTOR OR SOME OTHER TYPE SO THAT I CAN DISPLAY A REPORT FORMAT. Because i have more than one record in my table.The below is my ACTION CLASS.

public void performRim(HttpServletRequest req, X52Form form, ActionErrors errors) {

catch(Exception ex){

for example: -------------

Vector v=new Vector();
             HttpSession session = req.getSession();

thx, Ajay
Reply With Quote
  #2 (permalink)  
Old September 4th, 2007, 06:45 AM
Friend of Wrox
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post

You messed the code block Its difficult to understand. Anyway what you can do is use ArrayList class. Java5 supports generics i mean you can declare object for ArrayList as ArrayList<MyObject> list = new ArrayList<MyObject>(); the MyObject class will contain all the values for one row in your database. Loop through the resultset object and initialize the MyObject class instance with the values of current row and add this object to the Array list object. Hope you understand this. Be little more elaborate if you need more information.

- Rakesh
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
getting a result set to a vector cakalanka Java Databases 1 March 24th, 2008 07:33 AM
How to pass vector values form one JSP midhun JSP Basics 1 January 30th, 2006 06:49 PM
store values of recieved xml Steven1984 XML 0 April 17th, 2005 11:22 AM
To split values and store in the database lily611 SQL Server 2000 3 July 15th, 2004 09:01 AM

All times are GMT -4. The time now is 07:24 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.