Facelets is an XML-based viewing technology. & is a special XML character . It is interpreted as the beginning of an XML object, such as ,   etc. Therefore, he is looking for a finite character ; but did not find it, so it throws this error.
To represent & literally inside an XML document, you need to use & instead of & .
window.location = "DettaglioRichiesta.xhtml?id=" + id + "&box=" + box;
You can also just put this JS code in your own .js file, which you include <script src> so that you do not need to insert special XML characters in the JS code.
<script type="text/javascript" src="your.js"></script>
source share