File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Yes, Sean Owen's Compression Filter works with /* Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Yes, Sean Owen Watch "Yes, Sean Owen New topic
Author

Yes, Sean Owen's Compression Filter works with /*

Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
I am now using Sean Owen's Filter, instead of Jayson Falkner's filter. My filter mapping is:

<filter-mapping> <filter-name>CompressingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>

It works fine without throwing any Exception within Struts framework.

However, if I use /*.do, or /*.jsp, or /*.htm, it does not invoke the filter. It invokes the filter (obviously, for every page) only with /* url-pattern.

Question to Sean: Do you know why?

My Servlet does redirection to another JSP and Sean's filter is working fine within my Struts environment.

Comment to Sean: You have many assert statements like: assert config != null; You might consider removing those lines from published code. Otherwise, users have to comment those lines for the code to compile.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Yes, Sean Owen's Compression Filter works with /*
 
Similar Threads
XPath problem: can't resolve path
display tag export problem
Problem with Jayson Falkner's (onJava) Compression Filter
Blank page returned when filters are used with struts
Problem with *.do for Compression Filter using Struts