jsp with csv files
1 posts in topic
Flat View  Flat View

Posted By:   kishore_kumar
Posted On:   Friday, December 2, 2005 05:07 AM

hi everyone,

can any one favour me by supplying the code for importing

a csv file in jsp. my actual purpose is that i want to

make a preview of the data from csv file using flash to

the client or user. if any one is having the sample

code plz reply immediately.

thank u,


Re: jsp with csv files

Posted By:   Christopher_Koenigsberg  
Posted On:   Sunday, December 4, 2005 03:55 PM

Read the csv file in a servlet, into a Collection. Set the Collection in session scope attribute.

Forward to the JSP. In the JSP, use a displaytag (displaytag.org, sourceforge.net/projects/displaytag) or eXtreme table (extremecomponents.org, sourceforge.net/projects/extremecomp), naming the session scope attribute containing the Collection to be displayed.

Both the displaytag and eXtreme taglibs have built-in exporting capabilities, to some combination of XLS, CSV, XML, PDF, for the table data -- I think displaytag can export CSV or XML; I think eXtreme can export XLS, CSV, or PDF. (sorry no Flash though, but why on earth would you use Macromedia Flash, to just display tabular data?)
About | Sitemap | Contact