用eclipse+myeclipse+tomcat开发JSF时遇到的问题
我的配置:
eclipse: eclipse-SDK-3.2.1-win32
myeclipse: MyEclipseEnterpriseWorkbenchInstaller_5.1.0GA_E3.2.1
tomcat: apache-tomcat-6.0.2
我有一条语句:
<h:inputText required= "false " value= "#{user.name} "/>
运行时报错:
According to TLD or attribute directive in tag file, attribute value does not accept any expressions
我在另一个环境试过,没错(myeclipse5.0,tomcat版本记不清了)
请高手帮忙看看,别嫌分少哈,没分了。
内容:
User.java:
package mypro;
public class User {
private String name;
public void setName(String name)
{
this.name=name;
}
public String getName()
{
return this.name;
}
}
---------------------------------
userinfo.jsp:
<%@ page language= "java " pageEncoding= "GBK "%>
<%@ taglib uri= "http://java.sun.com/jsf/html " prefix= "h " %>
<%@ taglib uri= "http://java.sun.com/jsf/core " prefix= "f " %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+ ":// "+request.getServerName()+ ": "+request.getServerPort()+path+ "/ ";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN ">
<html>
<head>
<base href= " <%=basePath%> ">
<title> My JSF 'userinfo.jsp ' starting page </title>
<meta http-equiv= "pragma " content= "no-cache ">
<meta http-equiv= "cache-control " content= "no-cache ">
<meta http-equiv= "expires " content= "0 ">
<meta http-equiv= "keywords " content= "keyword1,keyword2,keyword3 ">
<meta http-equiv= "description " content= "This is my page ">
<!--
<link rel= "stylesheet " type= "text/css " href= "styles.css ">
-->
</head>
<body>
<f:view>
<h:form id= "a ">
<h:inputText required= "false " value= "#{user.name} "> </h:inputText> <br>
<h:commandButton action= "success "> </h:commandButton>
</h:form>
</f:view>
</body>
</html>
-----------------------
faces-config.xml:
<?xml version= "1.0 " encoding= "UTF-8 "?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN " "http://java.sun.com/dtd/web-facesconfig_1_1.dtd ">
<faces-config >
<managed-bean>
<managed-bean-name> u