×÷Ϊjava³ÌÐòÔ±£¬ÖÐÎĵÄÂÒÂëÎÊÌâ»á¾³£Åöµ½¡£¹ýÈ¥µÄÒ»¸öÏîÄ¿£¬ÎÒÅöµ½Á˸÷ÖÖÀàÐ͵ÄjavaÂÒÂëÎÊÌâ¡£ÏÈ·ÖÏí¸ø´ó¼Ò£º
1£ºÍøÒ³PostÇëÇó£¬Ìá½»ºó£¬ÏÔʾÌá½»½á¹û£¬ÂÒÂë¡£
Ê×ÏÈÈ·¶¨Êý¾Ý¿âµÄ±àÂ뷽ʽ¡£ÕâÀïÎÒ·¢ÏÖ£¬Èç¹ûÊý¾Ý¿âµÄ±àÂë²»ÊÇUTF-8£¬PostÇëÇóÒ²¿ÉÒÔ±£Ö¤»ØÏÔÕýÈ·£¬µ«ÊÇÓÐÒ»¸öµØ·½Òª×¢Òâ¡£
ÈçhtmlÖУº
£¨1£©<input type="text" name="num" value="${person.num}"/>
Õâʱ£¬valueÖеÄnumÖÐÎÄ»áÕý³£ÏÔʾ¡£
£¨2£©<input type="text" name="num" value="<c:out value="${person.num}">"/>
Õâʱ£¬valueÖеÄNumÖÐÎIJ»»áÏÔʾ£¬ÏÔʾÂÒÂë¡£
ÕâÊÇÒòΪjstl±êÇ©¿âµÄÔÒò¡£
ËäÈ»£¨1£©´úÂë¿ÉÒÔÏÔʾÖÐÎÄ£¬µ«ÈÔÈ»ÍƼöÊý¾Ý¿â±àÂë¸Ä³ÉUTF-8
2£ºÍøÒ³getÇëÇó£¬Ìá½»ºó£¬ÏÔʾÂÒÂë¡£
Õâ¸öÎÊÌâ¾Í±È½Ï¸´ÔÓÁË¡£
½â¾ö·½·¨¿ÉÒÔ·ÖΪÁ½²½£¬£¨ÎÒÃÇÊ×ÏÈ×öÁ˵ÚÒ»²¿£¬½â¾öÁ˴󲿷ÖÎÊÌ⣬µÚ¶þ²½Êǽâ¾öÌØÊâÎÊÌ⣩¡£
ÎÒÃÇÄÑÃâʹÓÃgetÇëÇóÌá½»£¬Èç¹ûÆäÖÐÓÐÖÐÎÄ£¬ÄÇô£º
£¨1£©TomcatÖУº
ÕÒµ½ server.xml ÖеÄ
<Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding='GBK' />
ÒÔÉÏ·½·¨ÊÇÔÚÍøÉÏÕÒµ½µÄ£¬ÎÒ³¢ÊÔÁË£¬Æð²»µ½Ð§¹û£¬µ«¸øÁËÎÒÃÇÆô·¢£¬ÎÒÃÇÈçÏÂ×ö£º
URIEncoding="UTF-8"
ûÏëµ½³É¹¦ÁË¡£ÎÒÏëÕâÓ¦¸ÃºÍÎҵIJÙ×÷ϵͳµÄÓïÑÔÓйء£ÎÒÃÇÊÇÓ¢ÎÄϵͳ¡£
£¨2£©Õâ¸öÊÇÎÒΪÁ˽â¾öһС²¿·Ö£¨ajaxºÍjs¶¯Ì¬Éú³ÉµÄhtml£©ÖÐÌá½»ÖÐÎÄÎÊÌ⣬ÒòΪÒÔÉϵķ½·¨¶¼½â¾ö²»ÁËÕâ¸öÎÊÌâ¡£ÎÒÕÒµ½ÁËÈçÏÂÀࣺ
public class Escape {
private final static String[] hex = { "00", "01", "02", "03", "04", "05",
"06", "07", "08", "09", "0A", "0B", "0C", "0D", "0E", "0F", "10",
"11", "12", "13", "14", "15", "16", "17", "18", "19", "1A", "1B",
"1C", "1D", "1E", "1F", "20", "21", "22", "23", "24", "25", "26",
"27", "28", "29", "2A", "2B", "2C", "2D", "2E", "2F", "30", "31",
"32", "33", "34", "35", "36", "37", "38", "39", "3A", "3B", "3C",
"3D", "3E", "
²åÈëÅÅÐòµÄ¹¤×÷ÔÀíÊÇͨ¹ý¹¹½¨ÓÐÐòÐòÁУ¬¶ÔÓÚδÅÅÐòÊý¾Ý£¬ÔÚÒÑÅÅÐòÐòÁÐÖдӺóÏòǰɨÃ裬ÕÒµ½ÏàӦλÖò¢²åÈë¡£Æä¾ßÌå²½Öè²Î¼û´úÂë¼°×¢ÊÍ¡£
/**
* ²åÈëÅÅÐò<br/>
* <ul>
* <li>´ÓµÚÒ»¸öÔªËØ¿ªÊ¼£¬¸ÃÔªËØ¿ÉÒÔÈÏΪÒѾ±»ÅÅÐò</li>
* <li>È¡³öÏÂÒ»¸öÔªËØ£¬ÔÚÒѾÅÅÐòµÄÔªËØÐò ......