您可以在
web.xml阻止所有对的请求时添加安全约束
*.xhtml。
<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>



