• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dynamic table creation

 
sharon christa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10527
64
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic