I use Java Facelets and jQuery however the expression
$('...')
in jQuery conflicts with EL expression, how can I avoid jQuery?
I would also like to get rid of a large piece of Javascript.
ANSWERED
To convert an existing JSP to Facelets xhtml, it’s convenient to simply wrap the existing javascript <![CDATA[ ... ]]>
. However, the output scripts for <script>
wrapped with a comment <!-- -->
, which conflicts with the CDATA section:
<script><![CDATA[ scripts... ]]></script> => <script><!-- <![CDATA[ scripts... ]]> --></script>
To solve this problem, you should also comment on CDATA:
<script>/* <![CDATA[ */ scripts... /* ]]> */</script> => <script></script>
See also When is a CDATA section needed in a script tag? .
source share