如何防止在JSF

时间:2016-03-01 10:35:28

标签: jsf

我有这样的项目结构: - Project Structure

我想只有当用户点击网址时才能访问home.xhtml,而健康检查和错误不应该是(临时测试将被删除)。

我尝试将两个xhtml文件放在详细的info文件夹中,但css不会工作 我的CSS链接样式 - <link rel="stylesheet" href="../css/normalize.css"></link>

并且如果我们把他的css分开页面加载但是当我引用页面时 例如 - localhost:9080 / Dashboarddetails / detailedinfo / healthcheck.xhtml

它给出了http 403错误,因为拒绝访问只会在第一次加载。

我使用了安全约束,但它不起作用请帮助

<security-constraint>
    <display-name>Restrict raw XHTML Documents</display-name>
    <web-resource-collection>
        <web-resource-name>XHTML</web-resource-name>
        <url-pattern>/detailedinfo/*</url-pattern>
    </web-resource-collection>
    <auth-constraint />
</security-constraint>

<url-pattern>/detailedinfo/*.xhtml</url-pattern>没有用,所以使用上面的

0 个答案:

没有答案