This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
*.do does not work. I want ALL pages to go through this filter. The url-pattern *.jsp does not go through Compression filter for all pages.
When I use *.do in url-pattern, it goes through Compression filter. However, it gives me a message (in IE) saying Windows cannot open the file myFirstPage.do and ultimately, it does not display the page.
I am using WSAD 5.1 (local box) as my server and Struts 1.1.
What url-pattern should I use so that all pages are filtered by Compression Filter?
Yes, I tried /*. It calls Compression filter for every display, as expected. However, blank page is returned.
My WSAD console gives following message when I use .* in url-pattern: u No message text associated with key WARNING:.Cannot.set.header..Response.already.committed. in bundle com.ibm.ejs.resources.seriousMessages WARNING: Cannot set header. Response already committed.
Joined: Jul 12, 2004
Does your application work well without the filter?
Joined: Jul 21, 2003
Yes, it works fine when I comment out the filter from web.xml.
You must have missed Mark's previous request for you to change your display name in order to comply with JavaRanch's naming policy. I would once again ask you to please take care of this. Thanks in advance.
I posted a similar note to another thread about GZipFilter:
I have heard that GZipFilter has problems when the app server applies it more than once to a request -- for example, when there are server-side forwards.
If I may be so bold as to plug my own work, I have created an open-source compression filter that is faster, cleaner and more comprehensive than GZipFilter. It does not suffer from the problem described above. If you are still having trouble, maybe you can give my filter a try?
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.