1

我正在尝试根据传入的 GET 参数过滤 URL。是否支持以下内容?基本上URL过滤对传入的参数起作用吗?我正在尝试对 /support 进行身份验证,但不是 /support?immediate=true。

       <security-constraint>
                <web-resource-collection>
                    <web-resource-name>Exceptions</web-resource-name>
                        <url-pattern>/watchdog</url-pattern> 
                        <url-pattern>/version.xml</url-pattern>             
                        <url-pattern>/files/dist/gui*</url-pattern> 
                        <url-pattern>/support?immediate=true</url-pattern> <----is this supported?
                        <url-pattern>/majorversion</url-pattern> 
                        <url-pattern>/services/*</url-pattern>              
                        <url-pattern>/remoting/*</url-pattern>  
                        <url-pattern>/alarm.vmsg</url-pattern>              
                        <url-pattern>/event.vmsg</url-pattern>  
                        <url-pattern>/fault.vmsg</url-pattern>  
                        <url-pattern>/jsp/style.css</url-pattern>
                        <url-pattern>/style.css</url-pattern>               
                    </web-resource-collection>
                <user-data-constraint>
                    <transport-guarantee>NONE</transport-guarantee>
                </user-data-constraint>
            </security-constraint>


    <security-constraint>
        <web-resource-collection>
            <web-resource-name>All Access is restricted</web-resource-name>
            <url-pattern>/*</url-pattern>                   
        </web-resource-collection>
        <auth-constraint>
            <role-name>user</role-name>
        </auth-constraint>

        <user-data-constraint>
            <!-- transport-guarantee can be CONFIDENTIAL, INTEGRAL, or NONE -->
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <login-config>
        <auth-method>BASIC</auth-method>
        <realm-name>Server</realm-name>
    </login-config>

    <security-role>
        <role-name>user</role-name>
    </security-role>
4

1 回答 1

0

您不能,它必须在您的 servlet 源代码上实现。

于 2013-10-31T20:53:55.440 回答