Data exporting

ID Email Status Date URL
59349 invidunt-dolor@eos.com KASD Thu Nov 12 22:24:57 CET 2009 http://www.dolor.org/
10109 labore-sed@ut.com DOLORES Fri Aug 07 22:24:57 CEST 2009 http://www.sed.org/
21005 dolores-gubergren@At.com SIT Fri Sep 24 22:24:57 CEST 2010 http://www.gubergren.org/
78872 Stet-takimata@et.com VERO Sun Jan 04 22:24:57 CET 2009 http://www.takimata.org/
33327 sanctus-sadipscing@amet.com AT Sun Jun 07 22:24:57 CEST 2009 http://www.sadipscing.org/
67661 et-est@dolore.com CLITA Wed Jan 20 22:24:57 CET 2010 http://www.est.org/
72655 ipsum-est@consetetur.com ERAT Mon Oct 11 22:24:57 CEST 2010 http://www.est.org/
48547 amet-Lorem@sed.com IPSUM Mon Nov 16 22:24:57 CET 2009 http://www.Lorem.org/
36952 sed-consetetur@consetetur.com VOLUPTUA Mon Apr 12 22:24:57 CEST 2010 http://www.consetetur.org/
68731 consetetur-magna@sed.com REBUM Wed Jun 23 22:24:57 CEST 2010 http://www.magna.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.