jsp 简单下载
<%@ page language="java" import="java.util.*" contentType="text/html;charset=GBK"%> <% String sql ="delete from abc"; response.setContentType("text/plain"); response.setHeader("content-disposition","attachment; filename=ccccc.sql.txt"); response.setHeader("Content_Length", sql.length()+""); response.setCharacterEncoding("GBK"); out.write(sql); out.flush(); out = pageContext.pushBody(); %>