@SuppressWarnings("unchecked")
@Override
protected void doExecute(String finalLocation, ActionInvocation invocation)
throws Exception {
Map request = (Map)invocation.getInvocationContext().get("request");
TableModel tableModel = (TableModel)request.get("exceltable");
HttpServletResponse response = (HttpServletResponse) invocation.getInvocationContext().get(HTTP_RESPONSE);
response.setHeader("Content-Disposition", "attachment;filename=" + tableModel.getModelName() + ".xls");
if(tableModel != null){
logger.debug("Output Excel {}.xls", tableModel.getModelName());
TableModelUtils.outputExcel(response.getOutputStream(), tableModel);
}
}