Secure JSP Taglibs
Secure JSP Taglibs 提供了一个用来保护页面内容的标签库,通过判断当前访问者是否具备某种角色来控制页面的内容显示。使用方法:
<secure:one roles="role1toevaluate, role2toevaluate">
Show this content if the user has one of the specified roles.
</secure:one>
<secure:all roles="role1toevaluate, role2toevaluate">
Show this content if the user has all the specified roles.
</secure:all>
<secure:none roles="role1toevaluate, role2toevaluate">
Show this content if the user has none of the specified roles.
</secure:none>
评论