严重: Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Cannot find
packagecom.test.ssh.fenye.action;publicclassPageActionextendsDispatchAction{publicPag...
package com.test.ssh.fenye.action;
public class PageAction extends DispatchAction{
public PageAction(){
System.out.println("on loading PageAction");
}
private PageService pageservice;
public ActionForward execute (ActionMapping map,ActionForm form,HttpServletRequest request,HttpServletResponse response){
PageForm myform=(PageForm)form;
String uri=pageservice.getpage(request, myform.getPagesize(), myform.getPagenumber(),myform.getSign(),myform);
return map.findForward(uri);}
public PageService getPageservice() {
return pageservice;}
public void setPageservice(PageService pageservice) {
this.pageservice = pageservice;}
public String getpage(HttpServletRequest request, int pagesize,
int pagenumber, String sign,PageForm form) {
List<PersonVO> volist = new ArrayList<PersonVO>();
PageSetVo pagesetvo = new PageSetVo();
if(sign.equals(Page.PAGE_UP)){
if(pagenumber==0){
pagesetvo.setIs(Page.NO_UP);
}else if(pagenumber-1==0){
pagenumber=pagenumber-1;
pagesetvo.setIs(Page.NO_UP);
}
else{
pagenumber=pagenumber-1;
}
List<Person> polist = pagedao.getPage(pagesize, pagenumber);
for(Person person:polist){
PersonVO vo=(PersonVO)Page.beancopy(person,PersonVO.class);
volist.add(vo);
}
}
if(sign.equals(Page.PAGE_DOWN)){
int pagecount = Page.pageCount(pagesize,pagedao.getPageCount());
if(pagenumber+2>=pagecount){
pagesetvo.setIs(Page.NO_DOWN);
}else{
pagenumber=pagenumber+1;
}
List<Person> polist = this.pagedao.getPage(pagesize, pagenumber);
for(Person person:polist){
PersonVO vo=(PersonVO)Page.beancopy(person,PersonVO.class);
volist.add(vo);
}
}
form.setPagenumber(pagenumber);
request.setAttribute("page",pagesetvo);
request.getSession().setAttribute("volist",volist);
return "page";
}
报错:
严重: Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Cannot find bean: "volist" in any scope
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
at org.apache.struts.taglib.logic.EmptyTag.condition(EmptyTag.java:79)
at org.apache.struts.taglib.logic.NotEmptyTag.condition
跪求大侠么帮忙 展开
public class PageAction extends DispatchAction{
public PageAction(){
System.out.println("on loading PageAction");
}
private PageService pageservice;
public ActionForward execute (ActionMapping map,ActionForm form,HttpServletRequest request,HttpServletResponse response){
PageForm myform=(PageForm)form;
String uri=pageservice.getpage(request, myform.getPagesize(), myform.getPagenumber(),myform.getSign(),myform);
return map.findForward(uri);}
public PageService getPageservice() {
return pageservice;}
public void setPageservice(PageService pageservice) {
this.pageservice = pageservice;}
public String getpage(HttpServletRequest request, int pagesize,
int pagenumber, String sign,PageForm form) {
List<PersonVO> volist = new ArrayList<PersonVO>();
PageSetVo pagesetvo = new PageSetVo();
if(sign.equals(Page.PAGE_UP)){
if(pagenumber==0){
pagesetvo.setIs(Page.NO_UP);
}else if(pagenumber-1==0){
pagenumber=pagenumber-1;
pagesetvo.setIs(Page.NO_UP);
}
else{
pagenumber=pagenumber-1;
}
List<Person> polist = pagedao.getPage(pagesize, pagenumber);
for(Person person:polist){
PersonVO vo=(PersonVO)Page.beancopy(person,PersonVO.class);
volist.add(vo);
}
}
if(sign.equals(Page.PAGE_DOWN)){
int pagecount = Page.pageCount(pagesize,pagedao.getPageCount());
if(pagenumber+2>=pagecount){
pagesetvo.setIs(Page.NO_DOWN);
}else{
pagenumber=pagenumber+1;
}
List<Person> polist = this.pagedao.getPage(pagesize, pagenumber);
for(Person person:polist){
PersonVO vo=(PersonVO)Page.beancopy(person,PersonVO.class);
volist.add(vo);
}
}
form.setPagenumber(pagenumber);
request.setAttribute("page",pagesetvo);
request.getSession().setAttribute("volist",volist);
return "page";
}
报错:
严重: Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Cannot find bean: "volist" in any scope
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)
at org.apache.struts.taglib.logic.EmptyTag.condition(EmptyTag.java:79)
at org.apache.struts.taglib.logic.NotEmptyTag.condition
跪求大侠么帮忙 展开
4个回答
展开全部
在所有的域里面没有找到所引用的Bean。
看看你的路径和Bean的名字是否存在还有你的Bean里面的属性
是不是有get/set方法。
看看你的路径和Bean的名字是否存在还有你的Bean里面的属性
是不是有get/set方法。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你的每个域里都拿不到volist对象
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
参考答案 儿童有无抱负,这无关紧要,可成年人则不可胸无大志
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询