File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Exporting Data using display tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Exporting Data using display tag" Watch "Exporting Data using display tag" New topic

Exporting Data using display tag

Vikas Kapoor
Ranch Hand

Joined: Aug 16, 2007
Posts: 1374
Hello Friends,

I am getting the following exception when i try to export the data using display tag's built-in facility.


Now,it doesn't face any problem while displaying data in table form on the page but when i try to export it (csv,excel,xml) then it fires the above exception.This is bit surprising to me.

The dispalytag related tags are in a jsp. This jsp is included in a Spring tag handler class by pageContext.include("xyz.jsp"). This tag(defined by the Spring Tag Handler class) is being used in another jsp where the table is displayed. Paging works perfectly, but when I click on export, the exception occurs.

I am using the followings:
JDK1.5,Displaytag 1.1 and Spring 1.2.7

The Actual flow is something like this.

1)Controller forwards the request to jsp page.

2)This jsp page uses a custom tag.

3)Now,it goes to custom tag handler class where i set the all the data into request like

4)Then i have included the page like

5)This xyz.jsp contains the following code.

Here,i get all the data on the page.

5)So,in this way the page is getting rendered.

I have also included filter into web.xml file.

Hope i have provided all the information.
I think i haven't made any silly mistake.

Looking forward to hear from you.


Vishal Pandya
wood burning stoves
subject: Exporting Data using display tag
jQuery in Action, 3rd edition