⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 downexcel1.jsp

📁 java高级引用管理综合朝鲜经java高级引用管理综合朝鲜经java高级引用管理综合朝鲜经java高级引用管理综合朝鲜经
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%@ page import="java.io.OutputStream"%>
<%@ page import="com.download.*" %>



 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'Downexcel.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  <%
try{
		      String fname = "结果信息";//Excel文件名		   
		      OutputStream os = response.getOutputStream();//取得输出流		
		 //     String sql= new String(request.getParameter("sql").getBytes("8859_1"));  
		 //     System.out.println("sql="+sql);
		      response.reset();//清空输出流
		      response.setHeader("Content-disposition", "attachment; filename="+new String("结果信息.xls".getBytes(),"iso-8859-1"));//设定输出文件头
		      response.setContentType("application/msexcel");//定义输出类型
		      YearExcel eb = new YearExcel();   
		      eb.expordExcel(os);
		    }catch(Exception e){
		      System.out.println(e);
		    }
 %>   
  <body>

  </body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -