天堂1111 发表于 2017-2-17 09:24:31

weblogic 下excel乱码问题的解决

在web.xml中配置   
<mime-mapping>
      <extension>xls</extension>
      <mime-type>application/xls</mime-type>
   </mime-mapping>



<%@ page language="java"   contentType= "text/html;   charset=UTF-8"%>
<%@ pageimport="java.util.*,java.util.regex.*,java.io.OutputStream"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

//response.setContentType("application/excel;charset=UTF8");
%>
<html>   
      <head>   
          <title></title>   
      </head>   
      <body>   
<iframe   id="frame1"   width="100%"   height="100%"   src="zjh.xls"/>   
      </body>   
</html>
页: [1]
查看完整版本: weblogic 下excel乱码问题的解决