You can get real path with HttpServletRequest.getSession().getServletContext() but this will be helpful If your application has session.If your application is sessionless than you can do by implementing ServletContextAware.
If application has session then
request.getSession().getServletContext().getRealPath("WEB-INF");
also one another way to get real path.