子元?/strong> | 描述 |
<web-resource-collection> | 声明受保护的web资源 |
<web-resource-name> | 指定受保护资源的名字Q是<web-resource-collection>的子元素 |
<url-pattern> | 受保护的URL路径Q是<web-resource-collection>的子元素 |
<http-method> | 指定受保护的HTTP讉KҎQ包括DELETE,GET,POST和PUTQ,如果不定义,表示所有的Ҏ都受保护Q是<web-resource-collection>的子元素 |
<auth-constraint> | 指定受保护资源安全限?/td> |
<role-name> | 指定可以讉K受保护资源的角色名,?lt;auth-constraint>的子元素 |
子元?/strong> | 描述 |
<auth-method> | pȝ对客户验证的cdQ有BASIC,DIGEST,FORM3U?/td> |
<realm-name> | 讑֮使用的Realm名称 |
<form-login-config> | 使用FORM验证时的配置信息 |
<form-login-page> | 使用FORM验证时的d面Q是<form-login-config>的子元素 |
<form-error-page> | 使用FORM验证时的错误处理面Q是<form-login-config>的子元素 |
子元?/strong> | 描述 |
<description> | 对当前的<security-role>元素q行描述 |
<role-name> | 引用的角色名U?/td> |
java.lang.SecurityException: Servlet of class org.apache.catalina.ssi.SSIServlet is privileged and解决Ҏ是:
cannot be loaded by this web application
http://localhost:8080/DBTest/test.jsp
执行Q结果如下: