小弟初学者,实在不知道这个错无怎么改啦  各位大哥帮帮忙:
报错:
type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception java.lang.IllegalStateException
org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:405)
org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:770)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:505)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.33 logs.
1.这是我的下载通用类
public class Download {
public void downLoad(String filePath, HttpServletResponse response, boolean isOnLine) throws Exception {
        File f = new File(filePath);//设置目标文件的路径
        if (!f.exists()) {
            response.sendError(404, "File not found!");//如果该文件不存在提示未找到
            return;
        }
        BufferedInputStream br = new BufferedInputStream(new FileInputStream(f));//创建输入流
        byte[] buf = new byte[1024];//流速为1024字节
        int len = 0;        response.reset(); // 非常重要
        if (isOnLine) { // 在线打开方式
            URL u = new URL("file:///" + filePath);
            response.setContentType(u.openConnection().getContentType());
            response.setHeader("Content-Disposition", "inline; filename=" + f.getName());
            // 文件名应该编码成UTF-8
        } else { // 纯下载方式
            response.setContentType("application/x-msdownload");
            response.setHeader("Content-Disposition", "attachment; filename=" + f.getName());
            
        }
        OutputStream out = response.getOutputStream();//创建输出流
        while ((len = br.read(buf)) > 0)//文件长度等于读取过来的长度,如果长度大于0执行循环
            out.write(buf, 0, len);
        br.close();
        out.close();
    }
}
2.这是我在Action中的调用
public String download() {
fttable = this.fdao.findById(id);
boolean isOnLine = true;
Download dl = new  Download();
HttpServletResponse response = ServletActionContext.getResponse();
try {
System.out.println(this.fttable.getDocpath());
dl.downLoad(this.fttable.getDocpath(), response, isOnLine);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "download";
}