好的,我有这些代码:
HttpServletRequest httpRequest = (HttpServletRequest) request;
String requestQueryString = httpRequest.getQueryString();
System.out.println(requestQueryString);
打开网址“http://127.0.0.1:8888/MyProject.html?gwt.codesvr=127.0.0.1:9997?_escaped_fragment_=home
”时,
gwt.codesvr=127.0.0.1:9997?_escaped_fragment_=home
该网址缺少http://127.0.0.1:8888/MyProject.html?
部分。
如何解决?
答案 0 :(得分:3)
这将是
httpRequest.getRequestURL() + "?" + httpRequest.getQueryString()
打印
http://127.0.0.1:8888/MyProject.html?gwt.codesvr=127.0.0.1:9997?_escaped_fragment_=home