jsp 导出文件实例代码
来源:网络 责任编辑:栏目编辑 发表时间:2013-07-01 07:32 点击:次
public ActionForward exportFile(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { String natLog = "test"; try { StringBuilder fileName = null; OutputStream output = null; byte[] streamBytes = natLog.getBytes(); if (streamBytes == null) {
} else { fileName = new StringBuilder(64); fileName.append("export.txt"); try {  
| |