先贴代码:
一、Struts1的Action中的一个方法的一段:
                                ExcelUtils u = new ExcelUtils();
try {
OutputStream outputStream = new BufferedOutputStream(response
.getOutputStream());
u.downLoadExcel(request, all, headName, outputStream);
} catch (IOException e) {
e.printStackTrace();
}
//return null;
request.setAttribute("pageData", lis);
return mapping.findForward("weekStat");
二、这是我要调用ExcelUtils类的 downLoadExcel()方法,方法内容如下:
public void downLoadExcel(HttpServletRequest request,List ls,String[] headName,OutputStream out){
   FileInputStream in=null;
File file=null;
String realPath = request.getRealPath("");
String userExcel = realPath + "\\userExcel\\"
+ new Date().getTime() + ".xsl";//获得服务器生成路ᅣ1�7+文件ᅣ1�7
this.outputExcel(userExcel, ls, headName);//生成excel
try {
file=new File(userExcel);
 in=new FileInputStream(file);
 while(true){
 byte[] b=new byte[1024];
 if(in.read(b)==-1){
 break;
 }
 out.write(b);
 }
} catch (IOException e1) {
// TODO Auto-generated catch block
System.out.println("下载excel异常");
e1.printStackTrace();
}finally{
try {
if(in!=null){
in.close();
}
if(out!=null){
out.flush();
out.close();
}
if(file!=null){
file.delete();
}
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

}
  }
三、现在的问题是,我这个方法执行完后,并没有return mapping.findForward("weekStat");页面上一直在运行,但实际上操作已经完成了。控制台也报错了,报错信息是:严重: Servlet.service() for servlet action threw exception
java.lang.IllegalStateException: Cannot forward after response has been committed
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:302)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at com.shareinfo.update.ver40.common.BaseActionServlet.process(BaseActionServlet.java:38)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

求高手解释