当我在我的页面中放置这样的标签时:
用户和管理员还会在运行时显示?
xmlns:sec ="http://www.springframework.org/security/tags"
spring-security-taglibs-3.2.3.RELEASE
我有2个文件夹(管理员和用户)
也用use-expressions ="true"测试
了不是结果!
我使用了mysql
表(users和user_roles)......
<sec:authorize access="ROLE_ADMIN">
<div> test Admin</div>
</sec:authorize>
<sec:authorize access="ROLE_USER">
<div> test User</div>
</sec:authorize>
or
<sec:authorize access="hasRole('ROLE_ADMIN')" >
<h:outputText value="Admin"/>
</sec:authorize>
<sec:authorize access="hasRole('ROLE_USER')" >
<h:outputText value="User"/>
</sec:authorize>
Run Code Online (Sandbox Code Playgroud)
security.xml文件
<http auto-config="true" use-expressions="true" >
<intercept-url pattern="/Admin/*" access="hasRole('ROLE_ADMIN')" />
<intercept-url pattern="/user/*" access="hasRole('ROLE_USER')"/>
...
</http>
Run Code Online (Sandbox Code Playgroud)
谢谢!
我
在自定义登录中使用spring security + JSF + primefaces ,我放了一个命令按钮,
但是命令按钮没有工作......
当在p:commandbutton ----------> ajax ="false"--- ------>是工作!
当使用f:jsf(核心)中的ajax -------->没有工作
,我在spring security.xml文件中使用:
test.xhtml ----> jsf(核心)-------->没有工作
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xml:lang="en" lang="en">
<head>
<title>faces-request</title>
</head>
<body>
<h:form>
<center>
<h:outputText id="outtxt" value="#{authentiocationBean.ajaxTest}"/><br/>
<h:inputText id="intxt" value="#{authentiocationBean.ajaxTest}"/><br/>
<h:commandButton value="Submit">
<f:ajax execute="intxt" render="outtxt"/>
</h:commandButton>
</center>
</h:form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
Spring_security.xml:
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.2.xsd">
<http auto-config="true" use-expressions="true">
<intercept-url pattern="/Admin/*" access="hasRole('ROLE_ADMIN')"/>
<intercept-url pattern="/user/*" access="hasAnyRole('ROLE_USER,ROLE_ADMIN')"/>
<form-login login-page="/login.xhtml" …Run Code Online (Sandbox Code Playgroud) 我是新的工作流程
我正在用activiti-cdi和jsf做一个项目.
如何在activiti designer中使用表单属性来渲染jsf表单元素?
或者
如何使用Activiti Explorer呈现表单?
我需要在我的jsf页面中指明表单(通过在启动事件或用户任务上定义表单属性),
这是最好的方法吗?
请帮忙...
谢谢