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
  •  | 
  •  

Pregunta

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
¿Fue útil?

Solución

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" />
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top