른록노트
[Java] ServletRequest request에서 Url 뽑는방법 본문
if (request instanceof HttpServletRequest) {
String url = ((HttpServletRequest)request).getRequestURL().toString();
String queryString = ((HttpServletRequest)request).getQueryString();
}
참고사이트
https://stackoverflow.com/questions/4389596/how-can-i-get-the-request-url-from-a-java-filter
반응형
Comments