른록노트

[Java] ServletRequest request에서 Url 뽑는방법 본문

Programming/[Java]

[Java] ServletRequest request에서 Url 뽑는방법

른록 2017. 8. 7. 15:43
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