Data exporting

ID Email Status Date URL
2604 sanctus-aliquyam@est.com REBUM Fri Oct 30 21:15:26 CET 2009 http://www.aliquyam.org/
93982 elitr-no@sit.com SED Sun May 31 21:15:26 CEST 2009 http://www.no.org/
7542 sadipscing-dolor@voluptua.com EST Sun Jan 18 21:15:26 CET 2009 http://www.dolor.org/
49205 sea-sed@dolor.com ET Mon Feb 23 21:15:26 CET 2009 http://www.sed.org/
93805 Stet-tempor@Lorem.com TAKIMATA Mon Aug 09 21:15:26 CEST 2010 http://www.tempor.org/
291 magna-duo@et.com ELITR Thu Nov 18 21:15:26 CET 2010 http://www.duo.org/
96120 accusam-At@erat.com DUO Fri Jul 03 21:15:26 CEST 2009 http://www.At.org/
90694 voluptua-ipsum@dolores.com DIAM Mon Nov 16 21:15:26 CET 2009 http://www.ipsum.org/
97613 gubergren-sed@sed.com EIRMOD Sun Jan 25 21:15:26 CET 2009 http://www.sed.org/
99112 labore-At@accusam.com AT Wed Apr 21 21:15:26 CEST 2010 http://www.At.org/

When you set the Table Tag's export attribute to "true", a footer will appear below the table which will allow you to export the data being shown in various formats, just click on the format.

If you need to change what you output based on the destination, use the media attribute of the Column Tag. In this example, we are making the url a hyperlink in html, we are just outputting it plain in csv and excel, and are skipping the column altogether in xml. Valid values for the media tag are 'html', 'xml', 'csv', and 'excel'.

Please note that the basic export functionality will not work when the JSP page is included in another page via a jsp:include or the RequestDispatcher. Front end frameworks such as Struts and Tiles will do this behind the scenes. If you want to use export functionality in any of these scenarios, you must configure an export filter (configuration is explained in the displaytag documentation). Also, make sure you check the FAQ on displaytag website.