This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes dynamic table creation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "dynamic table creation" Watch "dynamic table creation" New topic
Author

dynamic table creation

sharon christa
Greenhorn

Joined: Mar 01, 2012
Posts: 8
I want to upload a dataset and then read it and create a table to insert the data to the table. i am coding in JSP, can anyone please tell me how to do it??
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8046
    
  22

sharon christa wrote:I want to upload a dataset and then read it and create a table to insert the data to the table. i am coding in JSP, can anyone please tell me how to do it??

Well, I'm no JSP expert, but I assume that a JSP "table" will be based on some sort of Java collection (eg, a List?).

If so, I would create a class that encapsulates the data in your dataset - for example, if it contains personal information, create a Person class.
Then add a method that will create a Person object from a portion of the dataset (line/record?), and finally aggregate those to create a List<Person> (if that's what you need for JSP) from a whole dataset.

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamic table creation