Hi Gertjan,

In article <[EMAIL PROTECTED]>,
Tue, 30 Mar 2004 13:07:30 +0200,
Gertjan van Oosten <[EMAIL PROTECTED]> wrote: 
gertjan> I'm not quite sure what you mean.  If you want me to set ServletRedirector
gertjan> in the beginXXX() method that would fail to accomplish anything, since
gertjan> either I will have to protect ServletRedirector in the web.xml or the
gertjan> test will fail because the resource is not protected...
gertjan> Is my interpretation correct?

I think, if it is not conflicting with requirements of your app,
you can have two ServletRedirectors, one of which is protected
and the other is not portected.
    <servlet-mapping>
        <servlet-name>ServletRedirector</servlet-name>
        <url-pattern>/ServletRedirector</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ServletRedirectorSecure</servlet-name>
        <url-pattern>/ServletRedirectorSecure</url-pattern>
    </servlet-mapping>
    ....
    <security-constraint>
        <web-resource-collection>
                <web-resource-name>SecurityRestriction</web-resource-name>
                <description>Protect the Cactus redirector servlet.</description>
                <url-pattern>/ServletRedirectorSecure</url-pattern>
                <http-method>GET</http-method>
                <http-method>POST</http-method>
        </web-resource-collection>
        ....
    </security-constraint>


Then you can use /ServletRedirector to check whether the servlet is running,
and /ServletRedirectorSecure for the test.

Regards,
----
Kazuhito SUGURI
mailto:[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to