允许未经授权的用户访问 RichFaces Skin CSS 文件
我使用 AppFuse(使用 JSP 作为 Web 框架)和 RichFaces 创建了一个小型 Web 应用程序。有一个页面使用 rich:dataTable 无需身份验证即可访问。
为了使该页面公开,我将其放入名为“public”的文件夹中,并将以下行添加到 security.xml 中:
<intercept-url pattern="/public/*" access="ROLE_ANONYMOUS,ROLE_ADMIN,ROLE_USER"/>
现在无需身份验证即可访问该页面,但数据表没有皮肤,因为所需的 CSS 文件存储在以下文件夹中:显然需要身份验证...
RichFaces Skin CSS 文件可通过以下路径访问:
/a4j/s/3_3_2.SR1org/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAELXT5DOhSIAQ!sA18_.html
当我尝试访问文件时,我被重定向到登录页面。
那么如何允许未经授权的用户访问这些CSS文件呢?
谢谢,汤姆
编辑:我已经尝试将下面的行添加到 security.xml 但它不起作用:
<intercept-url pattern="/a4j/*" access="ROLE_ANONYMOUS,ROLE_ADMIN,ROLE_USER"/>
I've created a small web application using AppFuse(with JSP as Web Framework) and RichFaces. There is a page that uses rich:dataTable that should be accessible without authentication.
To make this page public I put it into a folder called "public" and added the following line to the security.xml:
<intercept-url pattern="/public/*" access="ROLE_ANONYMOUS,ROLE_ADMIN,ROLE_USER"/>
The page is now accessible without authentication but the dataTable has no skin as the required CSS files are stored in a folder that apparently requires authentication...
RichFaces Skin CSS files are accessed at this path:
/a4j/s/3_3_2.SR1org/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAELXT5DOhSIAQ!sA18_.html
And when I try to access the files I get redirected to the login page.
So how do I allow unauthorized users to access these CSS files?
Thanks, Tom
EDIT: I've already tried adding the line below to security.xml but it didn't work:
<intercept-url pattern="/a4j/*" access="ROLE_ANONYMOUS,ROLE_ADMIN,ROLE_USER"/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过将行从我的编辑更改为:
第二个 * 解决了问题......但我不知道为什么。 :)
Solved problem by changing the line from my edit to:
The second * does the trick...but I don't know why. :)