亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
12下一頁
最近訪問板塊 發(fā)新帖
查看: 4386 | 回復: 10
打印 上一主題 下一主題

jsp在linux建立中文目錄出現(xiàn)亂碼!求大家?guī)兔?(已解決) [復制鏈接]

論壇徽章:
1
操作系統(tǒng)版塊每日發(fā)帖之星
日期:2016-07-11 06:20:00
跳轉到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2007-06-07 20:06 |只看該作者 |倒序瀏覽
我在red hat AS4上 用jsp 建立中文目錄,目錄名都是亂碼,請問各位該如何解決啊!

對您的幫助不勝感激!


[ 本帖最后由 meself_110 于 2007-6-8 13:17 編輯 ]

論壇徽章:
0
2 [報告]
發(fā)表于 2007-06-07 20:16 |只看該作者
Can you describe in details how you do it?
As it might be caused by a lot of reasons.

Do you have these codes in your jsp?

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

論壇徽章:
1
操作系統(tǒng)版塊每日發(fā)帖之星
日期:2016-07-11 06:20:00
3 [報告]
發(fā)表于 2007-06-07 20:25 |只看該作者
我的linux系統(tǒng)語言是utf8,我把頁面代碼改成了下面的
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
還是亂碼! 還有別的方法么?

論壇徽章:
0
4 [報告]
發(fā)表于 2007-06-07 20:32 |只看該作者
Are you using tomcat?
If yes, then you still need to configure the following things at Tomcat level:

- Edit file <TOMCAT>/conf/server.xml under tag <Connector> to add URIEncoding="UTF-8" useBodyEncodingForURI="true".
- Edit file <TOMCAT>/bin/catalina.bat for Windows to add set CATALINA_OPTS = "-Dfile.encoding=UTF-8" or <TOMCAT>/bin/catalina.sh for Linux to add export CATALINA_OPTS = "-Dfile.encoding=UTF-8".

Besides, please ensure that your jsp file setting is set to UTF-8.
You may type in some chinese characters to test whether your file setting is set to UTF-8 or not. If you able to type and save it then its should be UTF-8 setting.

This is what I did previously and I managed display the chinese characters via jsp.

Hope this will help to solve your problem.

論壇徽章:
1
操作系統(tǒng)版塊每日發(fā)帖之星
日期:2016-07-11 06:20:00
5 [報告]
發(fā)表于 2007-06-07 20:55 |只看該作者
- Edit file <TOMCAT>/conf/server.xml under tag <Connector> to add URIEncoding="UTF-8" useBodyEncodingForURI="true".
中的<Connector> 是<Connector port=8080>這個么?

- Edit file <TOMCAT>/bin/catalina.bat for Windows to add set CATALINA_OPTS = "-Dfile.encoding=UTF-8"
這句話應該加在bin/catalina.bat 那里啊?

[ 本帖最后由 meself_110 于 2007-6-7 21:01 編輯 ]

論壇徽章:
0
6 [報告]
發(fā)表于 2007-06-07 21:35 |只看該作者
<Connector port=8080> is the port which you used to access your application.
For example: http://192.168.1.111:8080/testApplication/jsp/index.jsp

You may add this: set CATALINA_OPTS = "-Dfile.encoding=UTF-8"
on the first line of the batch file.

論壇徽章:
1
操作系統(tǒng)版塊每日發(fā)帖之星
日期:2016-07-11 06:20:00
7 [報告]
發(fā)表于 2007-06-07 21:44 |只看該作者
謝謝 toms1981

- Edit file <TOMCAT>/conf/server.xml under tag <Connector> to add URIEncoding="UTF-8" useBodyEncodingForURI="true".

應該加在那里 是單獨的建立一個 <Connector> 還是在原來已有的上面加上后面這句話?如果是在以有的上面加 應該加在那個tag <Connector> 里面呢?

再次謝謝!

論壇徽章:
0
8 [報告]
發(fā)表于 2007-06-07 21:48 |只看該作者
add
URIEncoding="UTF-8" useBodyEncodingForURI="true"
to your existing connector tag

論壇徽章:
1
操作系統(tǒng)版塊每日發(fā)帖之星
日期:2016-07-11 06:20:00
9 [報告]
發(fā)表于 2007-06-07 21:54 |只看該作者
謝謝了!我明天實驗下,今天得回去了.希望您明天有空的話,繼續(xù)關注下這個帖子.對于您的幫助萬分感謝!

論壇徽章:
0
10 [報告]
發(fā)表于 2007-06-07 22:04 |只看該作者
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復

  

北京盛拓優(yōu)訊信息技術有限公司. 版權所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關心和支持過ChinaUnix的朋友們 轉載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP