close
將中文檔名的PDF透過URL供下載結果發現中文檔名會變成亂碼導致ˋ404 ERROR
爬了一下文
修改Tomcat的Server.xml,在Connector標籤中加上URLEncoding 參數
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
useBodyEncodingForURI="true" URIEncoding="UTF-8"/>
重啟Tomcat 就解決此ISSUE
註:Tomcat 8的默認編碼是 UTF-8 但並不表示就無此異常,網路上有人提供相關解決方式,但沒Tomcat8的環境 改天再來try try
全站熱搜