You can use
HttpServletRequest#getRequestURI()
to obtain the request URI. The
getServletPath()
as suggested by the other answer is not necessarily helpful as it represents the servlet path (the matching part in the JSP/Servlet URL pattern), not the request URI (as the enduser sees in the browser address bar). If the JSP was been forwarded by some front controller servlet, you would get the JSP's own path instead of the virtual path as in the browser address bar.
Assuming that you have a menu which is represented by a List in the application scope where the Page class has url and name properties
you can use this code to find current page url, and then do your task
<c:set var="active" value="${fn:endsWith(pageContext.request.requestURI, page.url)}" />