jsp 错误代码 怎么解决?
org.apache.jasper.JasperException:javax.el.PropertyNotFoundException:Property'BookId'...
org.apache.jasper.JasperException: javax.el.PropertyNotFoundException: Property 'BookId' not found on type beans.Books
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
servlets.Modifybk.doGet(Modifybk.java:34)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.el.PropertyNotFoundException: Property 'BookId' not found on type beans.Books
javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193)
javax.el.BeanELResolver.property(BeanELResolver.java:267)
javax.el.BeanELResolver.getValue(BeanELResolver.java:60)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
org.apache.el.parser.AstValue.getValue(AstValue.java:97)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:923)
org.apache.jsp.modifybk_jsp._jspx_meth_c_005fforEach_005f0(modifybk_jsp.java:148)
org.apache.jsp.modifybk_jsp._jspService(modifybk_jsp.java:96)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
servlets.Modifybk.doGet(Modifybk.java:34)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
定义是小写 get() set()方法也有 还是上面的错误提示 我快疯了
public class Books {
private int id ;
private String bookid ;
public String getBookId() {
return bookid;
}
public void setBookId(String bookid) {
this.bookid = bookid;
}
} 展开
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
servlets.Modifybk.doGet(Modifybk.java:34)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.el.PropertyNotFoundException: Property 'BookId' not found on type beans.Books
javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193)
javax.el.BeanELResolver.property(BeanELResolver.java:267)
javax.el.BeanELResolver.getValue(BeanELResolver.java:60)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
org.apache.el.parser.AstValue.getValue(AstValue.java:97)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:923)
org.apache.jsp.modifybk_jsp._jspx_meth_c_005fforEach_005f0(modifybk_jsp.java:148)
org.apache.jsp.modifybk_jsp._jspService(modifybk_jsp.java:96)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
servlets.Modifybk.doGet(Modifybk.java:34)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
定义是小写 get() set()方法也有 还是上面的错误提示 我快疯了
public class Books {
private int id ;
private String bookid ;
public String getBookId() {
return bookid;
}
public void setBookId(String bookid) {
this.bookid = bookid;
}
} 展开
5个回答
展开全部
private String bookId;
public String getBookId() {
return bookId;
}
public void setBookId(String bookId) {
this.bookId = bookId;
}
//bean 设置相应的get set方法.JSP页面里使用bookId就解决了
public String getBookId() {
return bookId;
}
public void setBookId(String bookId) {
this.bookId = bookId;
}
//bean 设置相应的get set方法.JSP页面里使用bookId就解决了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在你的beans.Books类中没有定义BookId属性
检查你modifybk.jsp页面,看你里面调用Books bean的代码:
是否是你在使用Books类的BookId属性时将大小写弄错了,如写成了bookid或者Bookid等
那你的属性都有getter和setter方法吗????
检查你modifybk.jsp页面,看你里面调用Books bean的代码:
是否是你在使用Books类的BookId属性时将大小写弄错了,如写成了bookid或者Bookid等
那你的属性都有getter和setter方法吗????
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
...晕死,你把bean的属性定为private 的还想u.BookId这样来访问?还有你bean的属性起名也不规范,首字母小写.建议你好好再学习学习.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
javabean文件中未定义'BookId'属性,自己检查一下
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
楼上说的对啊。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询