Win a copy of High Performance Python for Data Analytics this week in the Python forum!

Anant Joshi

Greenhorn
+ Follow
since May 13, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anant Joshi

I have got solution.

I just had to change the order of the filters in my web.xml file and set
the displaytag filter first...

Regards,
Anant Joshi

11 years ago
Hello Nirmal,

You just have to change the order of the filters in web.xml file and set the displaytag filter first like

<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>


<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>

Set ResponseOverrideFilter before the struts2 FilterDispatcher .


Regards,
Anant Joshi


11 years ago
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 ?




11 years ago