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

jsp url´«ÖÐÎÄ×î¼òµ¥ÕýÈ·µÄ·½·¨

ÔÚjspÖУ¬Èç¹ûÔÚurlÖд«µÝÖÐÎÄʱ»á³öÏÖÂÒÂ룬ÔÚÍøÉϹØÓÚÕâÒ»ÎÊÌâµÄ½â¾ö·½·¨Î廨°ËÃÅ£¬µ«¶¼²»ÊǺÜ×àЧ£¡Æäʵ½â¾ö·½·¨·Ç³£¼òµ¥£º µÚÒ»²½£º±àÂ루ÒÔ´«µÝµÄ²ÎÊýΪstrΪÀý£© ÔÚ´«µÝÊý¾ÝÇ°½«str½øÐбàÂëJava.net.URLEncoder.encode(str) µÚ¶þ²½£º½âÂë ÔÚ»ñÈ¡Êý¾Ý¶Ë½«µÃµ½µÄÊý¾Ý½øÐнâÂë new String£¨str.getBytes("ISO8859_1")£©
¼òµ¥Ê¾Àý³ÌÐòÈçÏ£º
<%@ page contentType="text/html;charset=gb2312" %>
<a href="ds.jsp?url=<%=java.net.URLEncoder.encode("±àÂëµÄÊÇÕâÀï","GB2312")%>">µã»÷ÕâÀï</a>
<%
//request.setCharacterEncoding("GBK");
if(request.getParameter("url")!=null)
{
str=request.getParameter("url");
//ÏÂÃæÊǽâÂë
str=java.net.URLDecoder.decode(str,"GB2312");
str=new String(str.getBytes("ISO-8859-1"));
out.print(str);
}
%>
À´×Ô£ºhttp://blog.csdn.net/fhm727/archive/2009/09/03/4513811.aspx


Ïà¹ØÎĵµ£º

jsp½ûÖ¹Ò³Ã滺´æ

1.½ûÖ¹¿Í»§¶Ë»º´æÒªÔÚ<head>ÖмÓÈëÀàËÆÈçÏÂÄÚÈÝ£º
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
2.ÔÚ·þÎñÆ÷µÄ¶¯Ì¬ÍøÒ³ÖнûÖ¹»º´æ£¬Òª¼ÓÈëÀàË ......

JSPÊý¾Ý¿âÁ¬½Ó´óÈ«

JSPÊý¾Ý¿âÁ¬½Ó´óÈ«
2008-07-22 11:47
Ò»¡¢jspÁ¬½ÓOracle8/8i/9iÊý¾Ý¿â£¨ÓÃthinģʽ£©
testoracle.jspÈçÏ£º
< %@ page contentType="text/html;charset=gb2312"% >
< %@ page import="java.sql.*"% >
< html >
< body >
< %Class.forName("oracle.jdbc.driver.OracleDriver").new ......

»ùÓÚJSPµÄÎïÁ÷¹ÜÀíƽ̨

Ñ¡ÌâÒÀ¾Ý¼°Ñо¿ÒâÒå
ÏÖ´úÎïÁ÷£¬ÊÇÖ¸²úÆ·´ÓÉú²úµØµ½Ïû·ÑµØÖ®¼äµÄÕû¸ö¹©Ó¦Á´£¬ÔËÓÃÏȽøµÄ×éÖ¯·½Ê½ºÍ¹ÜÀí¼¼Êõ£¬½øÐиßЧÂʼƻ®¡¢¹ÜÀí¡¢ÅäËÍÁ´£¬ÎªÓû§Ìṩ¶à¹¦ÄÜ¡¢Ò»Ì廯µÄ×ÛºÏÐÔ·þÎñ£¬´Ó¶ø´ïµ½½µµÍÁ÷ͨ³É±¾¡¢Ìá¸ßÉú²úЧÂÊ¡¢Ôö¼ÓÆóÒµÀûÈó¡£µÄÐÂÐÍ·þÎñÒµ¡£Ëüͨ¹ý¶ÔÔËÊä¡¢²Ö´¢¡¢×°Ð¶¡¢¼Ó¹¤¡¢ÕûÀí¡¢ÅäËÍÓëÐÅÏ¢µÈ·½ÃæÓлú½áºÏ£¬ÐÎ ......

Java/JSP»ñµÃ¿Í»§¶ËÍø¿¨MACµØÖ·µÄÈýÖÖ·½·¨½âÎö

´ÓÍøÉϲéÕÒ×ÊÁÏjava/jsp»ñµÃ¿Í»§¶Ë(IE)Íø¿¨MACµØÖ·µÄ·½·¨´ó¸ÅÓÐÈýÖÖ¡£
1¡¢Í¨¹ýÃüÁʽ£¬ÔÚ¿Í»§¶ËÖ´ÐÐIpconfig µÈµÈ
2¡¢Í¨¹ýActiveXµÄ·½·¨
3¡¢Í¨¹ýÏò137µÄ¶Ë¿Ú·¢ËͲéѯָÁîµÄ·½·¨
¼ò½é£º
µÚÒ»ÖÖ·½·¨,ÔÚÕæÕýÓõ½Ê±ºò²»ÖªµÀΪʲô»ñµÃmacµØÖ·µÄÖ¸Áî×èÈûÁË,²»ÍùϼÌÐøÖ´ÐС£¶øÇÒËÙ¶ÈÊÇÕâÈýÖÖ·½·¨ÖÐ×îÂýµÄÒ»ÖÖ¡£
´úÂëÈçÏ ......

JSPÒ³ÃæÇ¿ÖƲ»»º´æµÄ·½·¨

ÓеÄÒ³ÃæÐèҪÿ´Îµã»÷½øÈ¥¶¼¶¯Ì¬¸üУ¬¶ø²»ÊǶÁÈ¡»º´æÖеÄÒ³Ãæ¡£
ÔÚJSPÖпÉÒÔÕâÑùʵÏÖ£º
<%
request.setCharacterEncoding("GBK");
response.addDateHeader("Expires",0);
response.setHeader("Pragma","no-cache");
response.setHeader("Cache-Control","no-cache");

%> ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ