Use WebUtils.getWebContentPaths(project) instead. It's better in case of multiple web root folders.