javaBean的一个小问题,请大家帮我看看!!!!!
//testBean.jsp文件
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>TestBean</title>
</head>
<body>
<jsp:useBean id="Test" scope="page" class="test.TestBean1" />
<jsp:getProperty name="Test" property="ID" />
<jsp:getProperty name="Test" property="name" />
</body>
</html>
//TestBean1.class文件
package test;
public class TestBean1
{
private String ID = "123";
private String name = "haosjt";
public TestBean1() { }
public void setID(String ID) {
this.ID = ID;
}
public String getID() {
return ID;
}
public void setName(String username) {
this.name = username;
}
public String getName() {
return name;
}
}
测试的时候,不知道为什么:<jsp:getProperty name="Test" property="ID" />
没有错误,一加上这一句:<jsp:getProperty name="Test" property="name" />就出现错误,请大家帮我看看吧。谢谢了!!!!!!