You cannot insert a substring </script> anywhere in a script block.
Change the call to document.write :
<script> window.jQuery || document.write('<script src="<%=request.getContextPath()%>/resources/jq/jquery-1.10.2.min.js"></' + 'script>') </script>
The browser “parses” the contents of the <script> , blindly looking for the closing </script> , ignoring the syntax of the content.
source share