在做jsp向后臺(tái)的servlet傳遞中文參數(shù)時(shí)出現(xiàn)亂碼,網(wǎng)上看了下,有用編解碼方式,還有很多其他的方式,最后發(fā)現(xiàn)這種方法是最簡單的
打開tomcat的server.xml
添加藍(lán)色部分即可!
<Connector port="8080"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" URIEncoding="UTF-8或GBK"/>
ref:
http://m.tkk7.com/parable-myth/archive/2008/09/03/226675.html
posted on 2009-06-02 15:40
fl1429 閱讀(3253)
評(píng)論(0) 編輯 收藏 所屬分類:
Jsp/Servlet/Javabean