67,512
社区成员
发帖
与我相关
我的任务
分享
private User user;
private String inputPath;
private String filename;
public InputStream getInputStream() throws Exception {
return ServletActionContext.getServletContext().getResourceAsStream(
this.getInputPath());
}
/**
* 导出Excel
*
* @return
*/
public String exportExcel() {
}
public class SiteInterceptor extends AbstractInterceptor {
@Override
public String intercept(ActionInvocation invocation) throws Exception {
Map<String, Object> parameters = invocation.getInvocationContext()
.getParameters();
Stringed = parameters.get("filename").toString();
System.out.println(ed);
Map session = invocation.getInvocationContext().getSession();
String role = (String) session.get("filename");
System.out.println("AuthorizationInterceptor.username:\t" + role);
return invocation.invoke();
}
}
<interceptor-ref name="reportForms" >
<param name="includeMethods">exportExcel</param>
<param name="excludeMethods">exportChartXML</param>
</interceptor-ref>
ActionContext actionContext = invocation.getInvocationContext();
HttpServletRequest request= (HttpServletRequest) actionContext.get(StrutsStatics.HTTP_REQUEST);
System.out.println(request.getParameter("export.strDate"));
System.out.println(request.getParameter("export.nodeid"));