Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  11] [ 3]  / answers: 1 / hits: 15095  / 12 Years ago, mon, september 17, 2012, 12:00:00

i'm using JSTL <c:out> in my project to support javascript code, i have a string that comes from the servlet like this 2'000;11'222;10'333 with javascript i'd like to split it to obtain separated values like 2'000;11'222;10'333....but when i use the <c:out> tag this ' becames &#039; messing up the split function....



is there a way to tell JSTL not escape chars ?



stringaCompleta += 'Gennaio;<c:out value=${valori.value} />';

More From » java

 Answers
3

Simply don't use the c:out tag at all:



stringaCompleta += 'Gennaio;${valori.value}';


Or use it with escapeXml set to false (but it's needlessly complex):



stringaCompleta += 'Gennaio;<c:out value=${valori.value} escapeXml=false />';


The documentation would have told you.


[#83054] Friday, September 14, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mckaylab

Total Points: 311
Total Questions: 120
Total Answers: 93

Location: Montenegro
Member since Thu, Jun 16, 2022
2 Years ago
;