GWT URL参数
使用URL参数的正确方法是什么?
我的URL是这样的: http:// localhost:8080 /#pg5?testing = abc
在我的代码中,我尝试使用这行代码获得测试的价值:
String value = com.google.gwt.user.client.Window.Location.getParameter("testing");
不幸的是,所有这一切都将我的字符串设置为“undefined”。
我想也许它没有得到正确的URL,但这段代码返回正确的URL:
String value = com.google.gwt.user.client.Window.Location.getHref();
我知道我可以解析url来获取我的参数,但我认为这就是getParamerter()的用途。
url应该是http:// localhost:8080 /?testing = abc#pg5而不是http:// localhost:8080 /#pg5?testing = abc