|
Thank you for your answer. Looking at my web.xml, there is a
<filter-mapping/> entry for the filter in question. I'll remove
it and see what happens. Frederic Kazuhito SUGURI wrote: Hi Frederic, In article <[EMAIL PROTECTED]>, Fri, 25 Feb 2005 09:51:09 -0700, Frederic Jean <[EMAIL PROTECTED]> wrote: Frederic> I'm trying to test an authorization type filter. Under some Frederic> circumstances, the filter has to return an HTTP response code of 403 Frederic> (Forbidden). Frederic>Frederic> When I try to test the filter under conditions where it should return a Frederic> 403, I get the following exception instead: Frederic> Frederic> [cactus] Testcase: testNoAssetId took 0.087 sec Frederic> [cactus] Caused an ERROR Frederic> [cactus] Failed to get the test results at Frederic> [http://localhost:8880/delivery-cactus/test/filterRedirector.jsp] Frederic> [cactus] org.apache.cactus.util.ChainedRuntimeException: Failed to Frederic> get the test results at As a possible case, your web.xml may contains filter-mapping entry which applies the filter to requests to the FilterRedirector, http://localhost:8880/delivery-cactus/test/filterRedirector.jsp. for this case. (I'm not sure why it has jsp suffix). For example, if your web.xml have a filter-mapping entry like <filter-mapping> <filter-name>theFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> and theFilter can fail for the request from Cactus-client, Cactus-client cannot get test results. Codes are appending for an example. You should not add filter and filter-mapping entries for the SampleFilter to your web.xml to run this example successfully. If you add entries like follows to web.xml, the test will be failed as you encountered: <filter> <filter-name>sampleFilter</filter-name> <filter-class>SampleFilter</filter-class> </filter> <filter-mapping> <filter-name>sampleFilter</filter-name> <url-pattern>/FilterRedirector</url-pattern> </filter-mapping> I hope this helps you. ---- Kazuhito SUGURI mailto:[EMAIL PROTECTED] --
|
<<inline: logo_sun_sdn.gif>>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
