Java 版 (精华区)
Q: 怎样从HttpServletRequest中得到完整的请求URL?
A: String getFullURL(HttpRequest request){
StringBuffer url = request.
getRequestURL(); if (request.getQueryString() != null) {
url.append('?');
url.append(request.getQueryString());
}
return url.toString();
}
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.784毫秒