I have a resources web app, which only has static content, such as images, CSS and JavaScript.
I'm using these resources in another web app within JSF pages, but for some reason the JavaScript files are not loaded properly. I've seen two outcomes so far, either the JSF page renders weirdly (missing most of the content) or the page looks fine, but the JavaScript is not functional. CSS and images come alright.
I'm loading the resources like below
<head>
<link rel="stylesheet" type="text/css" href="http://localhost:8080/resources/css/styles.css" />
<script type="text/javascript" src="http://localhost:8080/resources/js/utils.js" />
</head>
FireBug shows that everything is loaded properly. The JavaScripts work fine when they are inline inside the JSF page.
I've tried with Jetty 8 and GlassFish 3, but results are pretty much same. Anyone got some pointers on what's the problem?