½â¾öJspÒ³ÃæURLÖд«µÝ²ÎÊýÂÒÂëµÄ·½·¨
JspÒ³ÃæÔÚURLÖд«µÝ²ÎÊý»á³öÏÖÂÒÂë
½â¾ö·½·¨ÈçÏ£º
Ò»¡¢Ê¹Óøü¸ÄTomcatµÄ·½·¨¡£Õâ¸ö·½·¨¼òµ¥£¬µ«ÊÇÐèÒª¸Ä¶¯µÄµØ·½ÊÇ·þÎñÆ÷Èí¼þ¼¶±ðµÄ£¬Èç¹ûÉÔ΢±ä¶¯ÏµÍ³½«ÎÞ·¨ÕýȷתÂ룬ÒÆÖ²ÐÔ²»¸ß¡£
1¡¢À´µ½tomcatĿ¼£¬ÕÒµ½confĿ¼ÏµÄserver.xmlÎʼۣ¬´ò¿ª£¬ÕÒµ½<Connector>±êÇ©£¬ÔÚ×îºóÌí¼ÓURIEncoding=’GBK’£¬Ð§¹ûÈçÏ£º
view plaincopy to clipboardprint?
<Connector
port="8080"maxThreads="150"minSpareThreads="25"maxSpareThreads="75"
enableLookups="false"redirectPort="8443"acceptCount="100"
debug="0"connectionTimeout="20000"
disableUploadTimeout="true" URIEncoding=″GBK″/>
<Connectorport="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"enableLookups="false" redirectPort="8443" acceptCount="100"debug="0" connectionTimeout="20000"disableUploadTimeout="true" URIEncoding=″GBK″/>
ÕâÖÖ·½·¨¶ÔgetÕâ¸ö·½·¨²âÊԳɹ¦¡£
2¡¢ÔÚÿ¸öJspÒ³ÃæÌí¼ÓÈçÏ´úÂë
view plaincopy to clipboardprint?
<%@pagepageEncoding=”gb2312″%>
<%@pagecontentType=”text/html;charset=gb2312″%>
<%request.setCharacterEncoding(”gb2312″);%>
<%@ page pageEncoding=”gb2312″%><%@ page contentType=”text/html;charset=gb2312″%><%request.setCharacterEncoding(”gb2312″);%>
±àÂ뷽ʽҲ¿ÉÒԸijÉGBK£¬Ö§³Ö·±ÌåÖÐÎÄ¡£ÖØÆôTomcat£¬ÕâÒ»²½ºÜÖØÒª£¬·ñÔò¿ÉÄÜ¿´²»µ½Ð§¹û¡£
ÕâÖÖ·½·¨¶Ôpost²âÊԳɹ¦¡£½¨ÒéÁ½ÖÖͬ²½Ê¹Óá£
¶þ¡¢Ê¹ÓÃJSPµÄ£ó£ã£ò£é£ð£ôLet
view plaincopy to clipboardprint?
<%=newString(elValue.getBytes("iso-8859-1"),"GBK")%>
<%=new String(elValue.getBytes("iso-8859-1"),"GBK")%>
Èý¡¢Ê¹ÓÃ×Ô¶¨ÒåJSTL
ÕâÊÇÎÒÃǵÄÖصãËùÔÚ,ÕâÀïÒªÏêϸ˵Ã÷.
µÚÒ»,±àд×Ô¶¨Òå±êÇ©
µÚ¶þ±àдtagÎļþ
µÚÈý²¿ÊðtagÎļþ
µÚËÄʹÓðÉ;)ºÜ¼òµ¥µÄ.
Ïà¹ØÎĵµ£º
<%@ page contentType="text/html; charset=gbk" language="java" import="java.io.*" buffer="64kb" %>
<%
String path_in = "";
String content = "";
path_in = request.getRealPath("/")+"admin"+File.separator+ ......
1¡¢Óû§µÇ¼½çÃælog.jsp
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content ......
ÔÚ¿ª·¢ÖÐÑéÖ¤ÂëÊDZȽϳ£Óõ½ÓÐЧ·ÀÖ¹ÕâÖÖÎÊÌâ¶Ôijһ¸öÌض¨×¢²áÓû§ÓÃÌض¨³ÌÐòÆƽⷽʽ½øÐв»¶ÏµÄµÇ½³¢ÊԵķ½Ê½¡£
´ËÑÝʾ³ÌÐò°üÀ¨Èý¸öÎļþ£º
1.login.jsp:µÇ¼ҳÃæ
2.code.jsp:Éú³ÉÑéÖ¤ÂëͼƬҳÃæ
3.check.jsp:ÑéÖ¤½á¹û
code.jsp
³ÌÐò´úÂë ==================================================
<%@ page co ......
jspʹÓÃ×é¼þ½øÐÐÎļþÉÏ´«
WEBÎļþÉÏ´«¿ÉÄÜÊÇÍøÕ¾½¨ÉèÖÐ×î³£ÓõŦÄÜÖ®Ò»£¬ÎÒÔÚÏîÄ¿¿ª·¢Öм¸ºõ¶¼ÐèҪʵÏÖÎļþÉÏ´«¹¦ÄÜ£®Ç°¶Îʱ¼ä×Ô¼ºËѼ¯ÁËһЩÉÏ´«×é¼þ£®ÕâƪÎÄÕÂÖн«½éÉÜÕâЩ×é¼þµÄʹÓ÷½·¨£¬²¢ÇұȽϸ÷×ÔµÄÓÅÁÓ£®
Ò»£¬smartupload×é¼þ£®
ÎÒÏëÖ»Òª×ö¸öÎļþÉÏ´«µÄÅóÓѶ¼ÖªµÀÕâ¸ö×é¼þ£¬ÎÒÈÏʶµÄÈËÖÐʹÓÃ×î¶àµÄÒ²ÊÇËü£¡ÎÒ¸ ......