String phonename = request.getParameter("phonename");
String version = request.getParameter("version");
String price = request.getParameter("price");
String begin ;
String end ;
//第一次传值时为空串
if(phonename==null){
phonename = "";
}
if(version==null){
version = "";
}
/*if(price==null){
price = "全部时间";
}
if("全部时间".equals(price)){
begin = "0";
end = "0";
}else{
begin = request.getParameter("begin");
end = request.getParameter("end");
}*/
/*int begin2 = Integer.parseInt(begin);
int end2 = Integer.parseInt(end);*/
PhoneService phoneService = new PhoneServiceImpl();
//List<Phone> list = phoneService.getPhoneList(phonename,version,begin2,end2);
List<Phone> phonelist = phoneService.getPhoneList(phonename,version);
// String begin3 = begin2+"";
// String end3 = end2+"";
request.setAttribute("phoneList", phonelist);
request.setAttribute("phoneName", phonename);
request.setAttribute("version", version);
//request.setAttribute("begin", begin3);
//request.setAttribute("end", end3);
//request.setAttribute("price", price);
此行为86行 request.getRequestDispatcher("phoneinfo_query.jsp").forward(request, response);
3 回答
緦唸
TA贡献1条经验 获得超0个赞
代码不完整,没法准确定位问题。
按你所说的问题,86行出现空指针。可能是 request.getRequestDispatcher(
"phoneinfo_query.jsp"
).forward(request, response);
"phoneinfo_query.jsp" 这个参数路径写错导致的。
重点是根据底下的root cause 报错显示,你这空指针也可能是
web容器内此phoneinfo_query.jsp 页面上224行上出现了空指针,建议你可以去编译路径下的classpath下查看phoneinfo_query.jsp 224行代码
添加回答
举报
0/150
提交
取消