javax.servlet.ServletException错误
javax.servlet.ServletException:org.apache.jasper.JasperException:Anexceptionoccurredp...
javax.servlet.ServletException: org.apache.jasper.JasperException: An exception occurred processing
2: <%
3: List list=(List)request.getAttribute("galList");
4: Illegal gal=new Illegal();
5: gal=(Illegal)list.get(1);
6: %>
7: <html>
8: <head>
我想接收一个action传过来的值,是list类型的,里面存的是Illegal 对象,可是现在在页面提取出来就报错了。啥问题
这个是我在action写入的方法,可以将值写到list里
public String treePage() throws Exception{
ActionContext ct= ActionContext.getContext();
HttpServletRequest request=(HttpServletRequest)ct.get(StrutsStatics.HTTP_REQUEST);
List treelist=com.souvi.global.service.Services.getTreeService().getTreedaoImpl().queryIllegal();
List temp_list=new ArrayList();
Map temp_map=null;
if(treelist!=null){
for (int i = 0; i < treelist.size(); i++) {
temp_map=(Map)treelist.get(i);
Illegal gal=new Illegal();
gal.setSEQ_BILLEGAL_ID((String)temp_map.get("SEQ_BILLEGAL_ID"));
gal.setBILLEGAL_NAME((String)temp_map.get("BILLEGAL_NAME"));
gal.setAFTER_ID((String)temp_map.get("AFTER_ID"));
temp_list.add(gal);
}
}
request.setAttribute("galList", temp_list);
return "galList";
} 展开
2: <%
3: List list=(List)request.getAttribute("galList");
4: Illegal gal=new Illegal();
5: gal=(Illegal)list.get(1);
6: %>
7: <html>
8: <head>
我想接收一个action传过来的值,是list类型的,里面存的是Illegal 对象,可是现在在页面提取出来就报错了。啥问题
这个是我在action写入的方法,可以将值写到list里
public String treePage() throws Exception{
ActionContext ct= ActionContext.getContext();
HttpServletRequest request=(HttpServletRequest)ct.get(StrutsStatics.HTTP_REQUEST);
List treelist=com.souvi.global.service.Services.getTreeService().getTreedaoImpl().queryIllegal();
List temp_list=new ArrayList();
Map temp_map=null;
if(treelist!=null){
for (int i = 0; i < treelist.size(); i++) {
temp_map=(Map)treelist.get(i);
Illegal gal=new Illegal();
gal.setSEQ_BILLEGAL_ID((String)temp_map.get("SEQ_BILLEGAL_ID"));
gal.setBILLEGAL_NAME((String)temp_map.get("BILLEGAL_NAME"));
gal.setAFTER_ID((String)temp_map.get("AFTER_ID"));
temp_list.add(gal);
}
}
request.setAttribute("galList", temp_list);
return "galList";
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询