gpt4 book ai didi

java - 如何从 HttpServletRequest 获取完整的 url?

转载 作者:行者123 更新时间:2023-11-29 05:23:29 27 4
gpt4 key购买 nike

<分区>

好的,我有这些代码:

HttpServletRequest httpRequest = (HttpServletRequest) request;
String requestQueryString = httpRequest.getQueryString();
System.out.println(requestQueryString);

当打开 url "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? 部分。

如何解决?

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com