普通类中能否使用.response=ServerletActionContext.getResponse()
AAction与BAction都需要使用一个输出文件类C,
在类C中使用函数
this.response=ServerletActionContext.getResponse()
response.reset(); // ??器区分
response.setContentType("application/octet-stream;charset=UTF-8");// ISO-8859-1
response.setHeader("Content-disposition", "attachment;filename="+ java.net.URLEncoder.encode("a.xls", "UTF-8"));
response.addHeader("Cache-Control", "no-cache");
对AAction与BAction这两个Action有什么影响么?
发现只要调用C中的函数后,两个Action函数对应的jsp文件就不调用onload了。
把这2个action中调用C函数的地方注释掉,就能正常调用onload了