当前位置: 技术问答>java相关
jsp中javaBean不能装入的问题。虽然很简单但很急!!!!!
来源: 互联网 发布时间:2015-11-20
本文导语: 各位大侠: 小弟在学习jsp时碰到jsp不能装入javaBean的问题: package tax ; public class TaxRate {// String Product ; double Rate ; public TaxRate() {// this.Product = "A001" ; this.Rate = 5 ; } public...
各位大侠:
小弟在学习jsp时碰到jsp不能装入javaBean的问题:
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) ;
}
}
编译能用过,生成TaxRate.class,但在jsp页面中运行时提示“Error: 500
Unable to compile class for JSP ”
具体的Rate.jsp见下:
小弟在学习jsp时碰到jsp不能装入javaBean的问题:
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) ;
}
}
编译能用过,生成TaxRate.class,但在jsp页面中运行时提示“Error: 500
Unable to compile class for JSP ”
具体的Rate.jsp见下: