WebSphere 7.0 won't run filter for root URL -
i have war file defines filter run on urls:
<!doctype web-app public "-//sun microsystems, inc.//dtd web application 2.3//en" "http://java.sun.com/dtd/web-app_2_3.dtd"> ... <filter> <filter-name>ourredirectservletfilter</filter-name> <filter-class>com.mycompany.redirectservletfilter</filter-class> </filter> ... <filter-mapping> <filter-name>ourredirectservletfilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
the filter designed perform redirects 'convenience' urls corresponding 'actual' url, don't think that's relevant problem.
on websphere 7.0, filter doesn't run requests root url, e.g. /ctxroot
or /ctxroot/
; instead 404 response. does run /ctxroot/blah
, whether blah
valid or invalid path.
i've tried adding additional filter mappings url patterns <url-pattern>/</url-pattern>
, <url-pattern></url-pattern>
, same behavior.
i've tested on base 7.0.0.0, , latest fix pack applied, i.e. 7.0.0.27.
the filter works expected on 8.5 , i'm pretty sure on 8.0, on every version of weblogic, jboss, , tomcat i've tried. seems bug 7.0, i'd still find workaround. know of one?
i looked @ body of 404 error response , saw error code srve0190e, led me this helpful page. issue filters aren't called default urls correspond resources don't exist (though swear tested url other context root, , filter called).
it's possible configure websphere call filters in situation setting custom property further described in linked page:
com.ibm.ws.webcontainer.invokefilterscompatibility=true
i found case of context root url, setting welcome-file
entry in web.xml
maps existing resource causes filter called:
<welcome-file-list> <welcome-file>fakehome.html</welcome-file> </welcome-file-list>
Comments
Post a Comment