初学bean,前来向各位学习请教
okzjq 2003-10-17 10:14:14 package tax;
public class TaxRate{
String Product;
double Rate;
public TaxRate(){
this.Product="A001";
this.Rate=5;
}
public void setProduct(String ProductName){
this.Product=ProductName;
}
public String getProduct(){
return (this.Product);
}
public void setRate(double rateValue){
this.Rate=rateValue;
}
public double getRate(){
return (this.Rate);
}
}
在网页中
产品:<jsp:getProperty name="bean" property="Product" /><br>
税率:<jsp:getProperty name="bean" property="Rate" /><p>
tomcat显示
org.apache.jasper.JasperException: Cannot find any information on property 'Product' in a bean of type 'tax.TaxRate'
但如果改为小写的"product"和“rate",即
产品:<jsp:getProperty name="bean" property="roduct" /><br>
税率:<jsp:getProperty name="bean" property="rate" /><p>
则正常显示,
恳请各位帮小弟解此惑!谢谢