我有一個GWT URL這樣GWT GET方法,檢索參數
http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997#ForumMessage=918
當我這樣做
Window.Location.getParameter( 「ForumMessage」)
我變得空?
順便說一下,我不明白爲什麼這個?gwt.codesvr = 127.0.0.1:9997在url!
我有一個GWT URL這樣GWT GET方法,檢索參數
http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997#ForumMessage=918
當我這樣做
Window.Location.getParameter( 「ForumMessage」)
我變得空?
順便說一下,我不明白爲什麼這個?gwt.codesvr = 127.0.0.1:9997在url!
要獲取URL片段的值(#
之後的部分)請致電Window.Location.getHash()
。這將返回所有「ForumMessage = 918」。
getParameter()
返回查詢參數,而不是URL片段。
See here for more information about the parts of a URL。
?gwt.codesvr=
部分需要運行在Development Mode。
看着這個主題GWT URL Parameters
這裏是answer
網址應該是http://localhost:8080/?testing=abc#pg5代替http://localhost:8080/#pg5?testing=abc
,並刪除部分(gwt.codesvr = 127.0.0.1:9997 )並在Web模式下運行它。我認爲它會解決你的問題
我正在currenly開發應用程序,如何在Web模式下運行它,因爲在url中,當我刪除這個在url(?gwt.codesvr = 127.0.0.1:9997)時,包含的警報正在顯示GWT模塊'biddingsystem'可能需要(重新)編譯,即使我再次編譯運行參數和調試參數 – Noor 2011-01-06 06:40:03