note to self about the c:out tag in JSTL
um, big time duh. it automatically escapes HTML/XML content for you. So, if you have a string consisting of HTML content with <'s and stuff, they will be output as the HTML encoded equivalent.
You can very easily get around it by adding the following to your c:out tag escapeXml="false".
In my case, I was using FCKEditor in a web page, and was redirecting back to the input page if validation didn't pass. When I tried to output the HTML generated by FCKEditor, it was being escaped by the c:out tag and not displaying properly in the text field.
This small change to the tag solved the problem.
w00t!

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home