security-constraint引起的HTTP Status 403 问题
今天在实验seam的时候碰到了个问题,用seam-gen生成ear的页面文件是xhtml的,它默认的servlet url是以seam为后缀的,我改成了/faces/*,然后直接请求xhtml页面,结果提示HTTP Status 403 - Access to the requested resource,在google找到的都是要修改tomcat/conf/tomcat-users.xml,可我用的是jboss,没有这个文件,能不能直接添加我没试。可是以前从来没有影响过使用啊?
忽然我想到在web.xml中有这样一段:
<security-constraint> <display-name>Restrict raw XHTML Documents</display-name> <web-resource-collection> <web-resource-name>XHTML</web-resource-name> <url-pattern>*.xhtml</url-pattern> </web-resource-collection> <auth-constraint/> </security-constraint>