JSF中前台页面为名称: <h:inputText id="name" value="#{user.name}"/><p>,显示为#{user.name},不识别 10
,后台也提取不到user.name的值,已经在faces-config.xml配置了<managed-bean><managed-bean-name>user</mana...
,后台也提取不到user.name的值,已经在faces-config.xml配置了<managed-bean>
<managed-bean-name>user</managed-bean-name>
<managed-bean-class>onlyfun.caterpillar.UserBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean> 展开
<managed-bean-name>user</managed-bean-name>
<managed-bean-class>onlyfun.caterpillar.UserBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean> 展开
2个回答
展开全部
与楼主相同问题,研究了两三天。最后终于解决。由于在百度的时候看到了楼主的问题,现在解决了。来回答一下,避免更多人的采坑 问题就是jdk版本和包版本的问题。jdk本人用的1.7,以下是maven依赖
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
注意:改了jdk之后,需要重启!!!
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
注意:改了jdk之后,需要重启!!!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询