I’m running jsf app on glassfish v3. Machine has poor internet connection, so my idea was to move static content (css files, web graphics, fonts etc) to external hosting (using apache). I use jsf 2.0 resources, so links are generated like /javax.faces.resource/screen.css.html?ln=css. Question is, how can I automagically redirect such resources to external machine? The ideal way would be change it in one place (maybe glassfish configuration?) rather than change every link in whole app. THanks
I’m running jsf app on glassfish v3. Machine has poor internet connection, so my
Share
That’s not possible with standard
<h:outputStylesheet>and<h:outputScript>components as the resources are loaded straight from the webapp context (and the classpath). Just use plain vanilla<link rel="stylesheet" />and<script></script>tags.There was ever a spec change request for this: issue 598. While this is targeted on JSF 2.2, I don’t think that this will be implemented seeing the low votes.