How to get real path in JSF
Posted by Qasim Khan on October 13, 2010
To get the real path we first need the servlet context
ServletContext ctx = (ServletContext) FacesContext.getCurrentInstance()
.getExternalContext().getContext();
After getting the servlet context now we are able to get the real path
String deploymentDirectoryPath = ctx.getRealPath("/");