Search This Blog

Wednesday, September 10, 2008

WebSphere filter in version 6.1.0.0 Vs 6.1.0.17

The problem :
In Version 6.1.0.0 (before I set the path 17) , my web xml contains the next filter declaration
<filter>
<filter-name>WSConfigFilter</filter-name>
<filter-class>com.fis.infra.presentation.web.services.weblogic.filter.WSConfigFilter</filter-class>
<init-param>
<param-name>LoginWebService</param-name>
<param-value>GUIWebServices/services/LoginFacade?WSDL</param-value>
</init-param>
<init-param>
<param-name>PresentationWebService</param-name>
<param-value>GUIWebServices/services/PresentationFacade?WSDL</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>WSConfigFilter</filter-name>
<url-pattern>/Infrastructure/RTInfra/WS_Client/WSConfig.xml</url-pattern>
</filter-mapping>
We access to this file WSConfig.xml in the login ( maybe the first page/data from server) ,I would like to generate this file in the server.
On version 6.1.0.0 this filter get invoked as you ask this file , after I installed the patch (6.1.0.17) this filter is not invoked only after he found this page ( I create it manually ).

The Solution:
After digging in the web i came up with this problem from IBM PK33090; 6.1: A filter that serves a file does not popup an alert message
So you can follow the instruction how to add Webcontainer custom property , and add the relvant property to solved this issue:

1. In the administrative console, click "Servers" and under Servers click "Application Servers"
2. Click on the server to which the custom property is to be applied
3. Under "Configuration" and "Container settings" click "Web Container Settings" and under Web Container Settings click "Web Container"
4. Under "Configuration" and "Additional Properties" click "Custom Properties"
5. In the Custom Properties page, click "New"
6. “Name" = com.ibm.ws.webcontainer.invokefilterscompatibility “Value”= true .
7. Click "Apply" or "OK"
8. Click "Save" in the "Messages" box which appears
9. Restart the server for the custom property to take effect

and than i saw my filter get invoked as usual.

No comments: