Data exporting

ID Email Status Date URL
84127 rebum-sadipscing@labore.com ET Fri Nov 13 13:51:23 CET 2009 http://www.sadipscing.org/
91411 elitr-sanctus@dolor.com DOLORE Thu Dec 04 13:51:23 CET 2008 http://www.sanctus.org/
14191 sea-sit@nonumy.com STET Thu Nov 05 13:51:23 CET 2009 http://www.sit.org/
93948 et-accusam@dolor.com DOLORES Thu Aug 13 13:51:23 CEST 2009 http://www.accusam.org/
72503 sit-clita@invidunt.com DUO Thu Oct 28 13:51:23 CEST 2010 http://www.clita.org/
80220 At-est@sanctus.com EIRMOD Sat Jan 23 13:51:23 CET 2010 http://www.est.org/
57437 et-rebum@consetetur.com ACCUSAM Tue Apr 27 13:51:23 CEST 2010 http://www.rebum.org/
18355 gubergren-sadipscing@erat.com TAKIMATA Sat Jun 05 13:51:23 CEST 2010 http://www.sadipscing.org/
59946 sed-dolores@rebum.com KASD Thu Mar 18 13:51:23 CET 2010 http://www.dolores.org/
46930 ea-sed@dolore.com ALIQUYAM Thu Jan 29 13:51:23 CET 2009 http://www.sed.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.