• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create a row record with a word attachment in a table?  RSS feed

 
Peter Cong
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In my java web jsf seam jboss application, I want to add a row in a table with some data fields such as date type, String etc, but one field will be a word attachment, does anybody know any example of how to do it? thanks a lot for any help,
Basically, there is a loop to create some rows of data in a table, before each table row data creation, I will create a word file and saved to a local path(the physical file path is hardcoded), then I will create a table row and attach this word file to that row. the loop will continue until the end of loop.
I appreciate if anybody can know any resource or example codes.
Thanks a lot,
 
Paul Clapham
Sheriff
Posts: 22835
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This table... is it a table in a database schema, or an HTML table, or maybe some other kind of table?
 
Peter Cong
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:This table... is it a table in a database schema, or an HTML table, or maybe some other kind of table?


Thanks a lot for you quick response, this table is a DB2 table schema, ideally, the word file attachment should be saved in DB2 table and then display this table (with the attachment) in the jsf data grid on jsf page. but I was told that to save attachment in db2 table is not a standard way to do because the file may be big, our db2 admin may not like to do that way.
So that is why,I am think to save the word fille to a place of C:\\ drive, and save the file link to the DB2 table, so really, there will be an attachment link on the jsf data grid, and user can click to open the attachment from jsf page.

Please let me know if there are any other good method to do it. thank you so much again.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!