Re: [solved] DynaView doesn't work with #{resource['x']}

Splash Forums PrettyFaces Users [solved] DynaView doesn't work with #{resource['x']} Re: [solved] DynaView doesn't work with #{resource['x']}

#20094

Ah, actually I forgot. You don’t even need /resources…

Any file under JAR:/META-INF/resources/* will be hosted as if it were at the root of the application (obviously folder structure still applies, so /META-INF/resources/foo/bar.xhtml will be hosted at /app/faces/foo/bar.xhtml

See JSF ref docs for a start: https://javaserverfaces.dev.java.net/nonav/docs/2.0/javadocs/index.html

However, that doesn’t give the full explanation. Anyway… that should work. Just put your file in JAR:/META-INF/resources/javascript.xhtml, and the file will be accessible as if it were in /WebContent/.

So http://localhost:8080/app/faces/javascript.xhtml should be the location of the file.

Also note that you can place additional configuration files in the JAR:/META-INF/pretty-config.xml file, and these will be merged into the master configuration when the server starts. This can help keep the configuration clean.