I’m doing a JSF Composite, but I m having a hard time with including my JS scripts inside. I’m tying this:
<cc:implementation>
<h:outputScript name="js/myCompositeHelper.js" />
...
</cc:implementation>
Here are the questions:
- For some reason, I cannot put a path inside of the name attribute, I get an error. What am I doing wrong?
- I know of target=’head’, but for websites, it’s better to put the JS in the footer, so how can I do that?
Thanks for any help.
PS: I’ve seen this, but Include a javascript for composite component only once in a page despite of composite components themselves used multiple times
I have no idea what your problem is as you didn’t describe the error in detail (the error message is usually the whole answer at its own). In any way, the markup and the
namelooks fine so far, assuming that it’s indeed placed in/resourcesfolder of public webcontent.Use
target="body". It’ll end up in end of body.