为什么 sec:authorize 不起作用?
我有一个基于 Facelets 的 JSF 2 页面,并在应用程序后面使用 Spring Security 3。当我在页面中放置一些像这样的标签时:
<sec:authorize access="hasRole('SS')" >
<h:outputText value="X" /></sec:authorize>
X 无论如何都会在运行时显示。 Eclipse 的自动完成功能可以在编程时正确显示“sec:”标签及其属性。有什么问题吗?
I have a JSF 2 page based on Facelets and use Spring Security 3 behind the application. When I put some tags like this within my page:
<sec:authorize access="hasRole('SS')" >
<h:outputText value="X" /></sec:authorize>
the X will display at runtime anyway. The auto completion feature of eclipse work correctly to show the "sec:" tags and their properties at programming time. what's the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你有:
在文件的顶部吗?
此外,您还需要在 securityBeans.xml 的 http 标记中使用
use-expressions="true"
。这样做意味着 securityBeans 中或任何地方的任何旧样式access="ROLE_BLAH"
标记也需要更改为使用表达式。Have you got:
at the top of the file?
Also, you need
use-expressions="true"
in the http tag in securityBeans.xml. Doing this means that any old styleaccess="ROLE_BLAH"
tags in securityBeans or wherever also need to change to use expressions.