One of my sites uses the displaytag taglib to format an Oracle result set. I recently tried to add on the export functionality to one of the pages but received this error:

Unable to reset response before returning exported data. You are not using an export filter. Be sure that no other jsp tags are used before display:table or refer to the displaytag documentation on how to configure the export filter (requires j2ee 1.3).

After doing some searching I found that there was not very much info out there but the solution is fairly simple and really is defined by the error message. You need to configure the export filter in your web.xml document. OK, but HOW do you do that? Below are the lines I added to my web.xml file to enable the displaytag export filters.


<filter>
<filter-name>ResponseOverrideFilter</filter-name>
<filter-class>org.displaytag.filter.ResponseOverrideFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>ResponseOverrideFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>

Then all I had to do was make sure that the JSP web application was reloaded in Tomcat. (See the other post on how to reload the web.xml file). This solution allows you to have JSP tags above your main displaytag table tag. This is very necessary in most applications which do preliminary processing, such as retrieving a dataset, checking login status, etc.

del.icio.us:JSP displaytag Excel Filter Error digg:JSP displaytag Excel Filter Error spurl:JSP displaytag Excel Filter Error wists:JSP displaytag Excel Filter Error simpy:JSP displaytag Excel Filter Error newsvine:JSP displaytag Excel Filter Error blinklist:JSP displaytag Excel Filter Error furl:JSP displaytag Excel Filter Error reddit:JSP displaytag Excel Filter Error fark:JSP displaytag Excel Filter Error blogmarks:JSP displaytag Excel Filter Error Y!:JSP displaytag Excel Filter Error smarking:JSP displaytag Excel Filter Error magnolia:JSP displaytag Excel Filter Error segnalo:JSP displaytag Excel Filter Error