Is it possible to ui:include files from an absolute file path rather than relative webapp path?

StackOverflow https://stackoverflow.com/questions/17436582

  •  02-06-2022
  •  | 
  •  

Question

Suppose I have the following in my JSF page:

<ui:include src="/WEB-INF/templates/footer.xhtml"></ui:include>

If this is changing to be static content loading from a non-webapp path - is is possible to change my ui:include to an absolute path on the file system?

Assumptions:

  • Mojarra 2.0
  • Java 7.0
  • Tomcat 7.0
Was it helpful?

Solution

On a mac (for example) the path look like this:

<ui:include src="file:///Users/Julian/Documents/.../WEB-INF/templates/footer.xhtml" />

On Windows the path looks like this:

<ui:include src="file:///C:/Users/.../footer.xhtml" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top