Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

jspÖÐÎÄÂÒÂë½â¾ö·½°¸


1¡¢jspÒ³ÃæÂÒÂ룺
ÔÚjspÒ³Ã濪ʼÌí¼Ó<%pageEncoding="uft-8"%>
2¡¢servletÊä³öÂÒÂ룺
ÔÚÊä³öÄÚÈÝ֮ǰ£¬ÏÈÖ´ÐÐresponse.setContentType
("text/html;charset=utf-8")
3¡¢ÔÚformÀïÓÃpost·½Ê½Ìá½»²ÎÊý£º
1£©½ÓÊÕʱ¼Órequest.setCharacterEncoding("utf-8")
2£©Ê¹ÓùýÂËÆ÷£¬ÔÚ½ÓÊÕ²ÎÊý֮ǰ£¬É趨´«µÝµÄ²ÎÊýÄÚÈݵıàÂëÊÇ
utf-8
4¡¢ÔÚµØÖ·À¸ÀïÊäÈë²ÎÊý£¬ÓÃget·½Ê½´«ÖÐÎIJÎÊý£º
¸Ätomcat\conf\server.xmlÀïµÄ
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" £¨¼ÓÉÏ£©URIEncoding="utf-8"/>


Ïà¹ØÎĵµ£º

ÔÚjspÖÐÖ±½ÓÊä³ö¶þ½øÖÆͼƬ


<%@ page info="Random Image Show"  
    pageEncoding="UTF-8" contentType="image/jpg"  
    autoFlush="true" buffer="16kb" session="false" import="java.io.FileInputStream"  
%>< ......

jsp+ajax×Ô¶¯Ë¢ÐÂʵÀý(ת)


Ò»¡¢´¦ÀíajaxÇëÇóµÄjspÎļþ£ºauto.jsp
<%@ page contentType="text/html; charset=gb2312" %>
<%
//ÉèÖÃÊä³öÐÅÏ¢µÄ¸ñʽ¼°×Ö·û¼¯
response.setContentType("text/xml; charset=UTF-8");
response.setHeader("Cache-Control","no-cache&q ......

JSPÖж¯Ì¬INCLUDEÓ뾲̬INCLUDEµÄÇø±ð

ÎÒÃǶ¼ÖªµÀÔÚjspÖÐincludeÓÐÁ½ÖÖÐÎʽ,·Ö±ðÊÇ
    <%@ include file=" "%>
    <jsp:include page=" " flush="true"/>
    Ç°ÕßÊÇÖ¸ÁîÔªËØ¡¢ºóÕßÊÇÐÐΪԪËØ.
    ͨ³£µ±Ó¦ÓóÌÐòÖÐËùÓеÄÒ³ÃæµÄijЩ²¿·Ö(ÀýÈç±êÌâ¡¢Ò³½ÅºÍµ¼º½À¸)¶¼ÏàͬµÄʱºò,Î ......

½«jspÍøÒ³Êý¾ÝÊä³öΪExcel»òWordÎļþ

½«Ò»¸öJSPÒ³ÃæÖеÄ<%@ page contentType="text/html; charset=GBK" language="java" %>Ì滻Ϊ
<%@ page contentType="application/vnd.ms-Excel;charset=GBK" language="java"%> //Excel
»ò
<%@ page contentType="application/vnd.ms-word;charset=GBK" language="java"%> //Word
ÔÚÒ³Ã濪ʼÊä³öÊý¾ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ