Hello Friends,
I have been using displaytag to export data with struts2. My application contains Customer Search UI,
that UI contains search fields and submit button. I filled data in search field after that i clicked on SEARCH
button then application shows data in display tag on same page. now i clicked on
Export option then application shows only Search Textfield and SEARCH Button. Grid data is no more display
and in console i got following exception.
2009-05-14 19:02:54,015 [ERROR] [/app].[default] - Servlet.service()
for
servlet default threw exception
Exception: [.TableTag] 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).
My Web.xml contains following code;
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<display-name>Event Management</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>ResponseOverrideFilter</filter-name>
<filter-class>
org.displaytag.filter.ResponseOverrideFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>ResponseOverrideFilter</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ResponseOverrideFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
</web-app>
Does anyone have any idea how to overcome this ?