JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Servlet/JSP 討論區  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友   
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 請問 URL 可帶中文名稱嗎?
b0481





發文: 11
積分: 0
於 2003-07-22 11:49 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
os : linux
web server : Tomcat 4.0

謝謝

RM.jsp (1.11k)


reply to postreply to post
作者 Re:請問 URL 可帶中文名稱嗎? [Re:b0481]
Roberto

黑就黑好唄

版主

發文: 193
積分: 4
於 2003-07-22 12:23 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
可以使用 java.net.URLEncoder

reply to postreply to post
作者 Re:請問 URL 可帶中文名稱嗎? [Re:Roberto]
b0481





發文: 11
積分: 0
於 2003-07-22 13:16 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我附的程式碼 有試過
可是一直不行
可否幫我看一下程式碼
或 給我一範例n
感激不盡


reply to postreply to post
作者 Re:請問 URL 可帶中文名稱嗎? [Re:b0481]
Roberto

黑就黑好唄

版主

發文: 193
積分: 4
於 2003-07-22 13:52 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
裡面有用到嗎 怎麼沒看到
不過超連結文件是不建議用中文檔名啦

<%@ page import="java.net.URLEncoder" %>
out.println("<p>1、 <a href=../chenjj/"+URLEncoder.encode(temp, "big5") +".htm>需求提供準則1</a></p>");


reply to postreply to post
作者 Re:請問 URL 可帶中文名稱嗎? [Re:Roberto]
b0481





發文: 11
積分: 0
於 2003-07-22 15:05 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
還是不行
是否有相關設定
需設定


reply to postreply to post
作者 Re:請問 URL 可帶中文名稱嗎? [Re:b0481]
Roberto

黑就黑好唄

版主

發文: 193
積分: 4
於 2003-07-22 16:17 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
大哥
我幫你試了 Tomcat 4.0.3, 4.1.18, 4.1.24
都可以啊
其中 4.0.3 需要用URLEncoder
4.1.18, 4.1.24 直接用中文就可以
這樣你還不行......那...

你先在瀏覽器直接打中文URL連連看有沒有
沒有那錯誤訊息是什麼 貼上來


Roberto edited on 2003-07-22 16:24
reply to postreply to post
作者 Re:請問 URL 可帶中文名稱嗎? [Re:b0481]
b0481





發文: 11
積分: 0
於 2003-07-23 09:10 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
1.瀏覽器直接打中文就不行了

2.程式執行的錯誤訊息

Apache Tomcat/4.0.4 - HTTP Status 404 - /chenjj/???D???????h.htm

需 求 管 理2.htm (0.63k)


reply to postreply to post
作者 Re:請問 URL 可帶中文名稱嗎? [Re:b0481]
browser

戀香

版主

發文: 3570
積分: 1
於 2003-07-23 09:27 user profilesend a private message to usersend email to browserreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
b0481 wrote:
1.瀏覽器直接打中文就不行了

2.程式執行的錯誤訊息

Apache Tomcat/4.0.4 - HTTP Status 404 - /chenjj/???D???????h.htm


有人執行程式 ... 會手動 key 在 url 上嗎 ????
而且還是 key 中文 .... >"<


reply to postreply to post
作者 Re:請問 URL 可帶中文名稱嗎? [Re:b0481]
b0481





發文: 11
積分: 0
於 2003-07-23 09:30 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
可是用程式執行也不行

需 求 管 理1.htm (0.83k)


reply to postreply to post
作者 Re:請問 URL 可帶中文名稱嗎? [Re:b0481]
b0481





發文: 11
積分: 0
於 2003-07-23 09:31 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
主程式

RM.jsp (1.28k)


reply to postreply to post
作者 Re:請問 URL 可帶中文名稱嗎? [Re:b0481]
worookie

Small Ship

版主

發文: 2092
積分: 21
於 2003-07-23 09:37 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
那末你如果 tomcat 不要跑
直接用個瀏覽器開個你的機器上的中文名稱的檔案
輸入像是: file://....../中文檔名.html 之類的
看看能不能打開
不能的話就是系統的問題
能的話就再說了, 不過至少已經確定問題和你的 jsp 程式無關


worookie edited on 2003-07-23 09:40
reply to postreply to post
作者 Re:請問 URL 可帶中文名稱嗎? [Re:b0481]
sho





發文: 14
積分: 1
於 2003-07-23 09:57 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
try:
out.println("<p>1、 <a href=../chenjj/"+URLEncoder.encode(temp, "UTF8") +".htm>需求提供準則1</a></p>"


reply to postreply to post
作者 Re:請問 URL 可帶中文名稱嗎? [Re:b0481]
b0481





發文: 11
積分: 0
於 2003-07-23 10:00 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
1.用file不行
2.直接用linux上的Mozilla就可以


reply to postreply to post
作者 Re:請問 URL 可帶中文名稱嗎? [Re:b0481]
b0481





發文: 11
積分: 0
於 2003-07-23 10:04 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不知道 什麼原因
可以了
但URL為何不是顯示中文名稱
而是顯示

http://140.116.82.50:8080/ckm/chenjj/%BB%DD%A8%44%B4%A3%A8%D1%B7%C7%AB%68.htm


reply to postreply to post
» JWorld@TW »  Servlet/JSP 討論區

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8