CodeAs follows:
<SCRIPT type = "text/JavaScript" src = "javascript/<% = java.net. urlencoder. encode (listjs. get (I), "UTF-8") %> "> </SCRIPT>
On a server written by a colleague, you can access the server normally, but you cannot access tomcat. It is always 404. It takes a long time to solve the problem ..
The solution is as follows:
Modify Tomcat's server. xml file (this solves the problem that files and images containing Chinese characters cannot be downloaded or displayed ):
<Connector Port = "8080" maxthreads = "150" minsparethreads = "25" maxsparethreads = "75" enablelookups = "false" redirectport = "8443" acceptcount = "100" DEBUG =" 0 "connectiontimeout =" 20000 "disableuploadtimeout =" true "uriencoding =" UTF-8 "/>
Uriencoding = "UTF-8" with this sentence can recognize Chinese files, that is, not only can display Chinese in JSP, you can also download display!
In addition to Uri contains Chinese, you can add usebodyencodingforuri = "true" after uriencoding = "UTF-8 "!