HTTP compression
If you want to use HATS
support for HTTP compression in projects migrated from HATS V5.0.x,
V6.0, and V6.0.1, you must manually add the compression filter to
the Web Deployment Descriptor file (web.xml). To add the compression
filter to the web.xml file:
- From the HATS Toolkit, switch to the Navigator view of the HATS perspective.
- Open the web.xml file located in the Web Content\WEB-INF folder of your project.
- Click the Source tab to view the source of this file.
- Copy the following statements after the last defined servlet mapping
(search for the last </servlet-mapping>).
<filter> <description>Provides compression for output from HATS entry servlet</description> <display-name>CompressionFilter</display-name> <filter-name>CompressionFilter</filter-name> <filter-class>com.ibm.hats.runtime.filters.CompressionFilter</filter-class> </filter> - Copy the following statements after the last defined filter mapping
(search for the last </filter-mapping>).
<filter-mapping> <filter-name>CompressionFilter</filter-name> <servlet-name>EntryServlet</servlet-name> <dispatcher>ERROR</dispatcher> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> <dispatcher>REQUEST</dispatcher> </filter-mapping> <filter-mapping> <filter-name>CompressionFilter</filter-name> <url-pattern>/</url-pattern> </filter-mapping> <filter-mapping> <filter-name>CompressionFilter</filter-name> <url-pattern>/index.jsp</url-pattern> </filter-mapping> - Save the file.
Note: If you have already run this project on the server,
you will need to republish the application for WebSphere® Application Server to pick up the change
to the web.xml file.