Why do you think you need requestURI? Why not getServletPath() + getPathInfo() ?