How to get the absolute path to the WEB-INF directory in a background threa

I want to load a file from WEB-INF/templates/… in a background thread. Can I get somehow the path to the WEB-INF directory?


You could try and use
((HttpServletRequest) VaadinRequest.getCurrent ()).getPathTranslated ()
to get to the real path of webapp and from there construct path to your resource into webapp/WEB-INF