JSTL - afficher html dans une variable - Java - Programmation
Marsh Posté le 06-04-2005 à 12:30:20
salut j'ai une varible qui contient du code html que j'aimerais insérer dans ma page jsp : en java ca marche très bien en faisant <%=mavariable> en JSTL je fais <c:out value="${mavariable}"/>, le code html apparait à l'écran !! <${mavariable}/> ne marche pas non plus voici le contenu à titre indicatif <MAP NAME="jfreechart-8755.png"> <AREA SHAPE="POLY" COORDS="250,38,262,39,273,41,295,50,314,64,323,72,330,82,336,92,341,103,346,126,345,150,342,161,338,173,250,135,250,135" title="CHARAC. IN SITU = 43" href="xy_chart.jsp?section=CHARAC. IN SITU&pieIndex=0"> <AREA SHAPE="POLY" COORDS="338,173,330,189,318,203,305,214,289,223,273,229,255,231,237,231,219,226,202,219,187,209,175,196,165,182,158,165,154,148,153,130,156,112,250,135,250,135" title="DEBUG = 65" href="xy_chart.jsp?section=DEBUG&pieIndex=0"> <AREA SHAPE="POLY" COORDS="156,112,157,108,250,135,250,135" title="DRAM = 1" href="xy_chart.jsp?section=DRAM&pieIndex=0"> <AREA SHAPE="POLY" COORDS="157,108,160,99,250,135,250,135" title="OTHER = 2" href="xy_chart.jsp?section=OTHER&pieIndex=0"> <AREA SHAPE="POLY" COORDS="160,99,168,83,179,69,192,58,207,48,250,135,250,135" title="QUALIF. REJECT = 16" href="xy_chart.jsp?section=QUALIF. REJECT&pieIndex=0"> <AREA SHAPE="POLY" COORDS="207,48,228,41,250,38,250,135,250,135" title="- = 10" href="xy_chart.jsp?section=-&pieIndex=0"> </MAP> merci pour votre aide
Marsh Posté le 06-04-2005 à 17:15:25
positionne l'attribut "escapeXml" à false: <c : out value="${toto}" escapeXml="false">
Marsh Posté le 06-04-2005 à 17:47:16
bien vu ct bien l'attribut escapeXml
Make sure you enter the(*)required information where indicate.HTML code is not allowed
Marsh Posté le 06-04-2005 à 12:30:20
salut j'ai une varible qui contient du code html que j'aimerais insérer dans ma page jsp :
en java ca marche très bien en faisant <%=mavariable>
en JSTL je fais <c:out value="${mavariable}"/>, le code html apparait à l'écran !!
<${mavariable}/> ne marche pas non plus
voici le contenu à titre indicatif
<MAP NAME="jfreechart-8755.png"> <AREA SHAPE="POLY" COORDS="250,38,262,39,273,41,295,50,314,64,323,72,330,82,336,92,341,103,346,126,345,150,342,161,338,173,250,135,250,135" title="CHARAC. IN SITU = 43" href="xy_chart.jsp?section=CHARAC. IN SITU&pieIndex=0"> <AREA SHAPE="POLY" COORDS="338,173,330,189,318,203,305,214,289,223,273,229,255,231,237,231,219,226,202,219,187,209,175,196,165,182,158,165,154,148,153,130,156,112,250,135,250,135" title="DEBUG = 65" href="xy_chart.jsp?section=DEBUG&pieIndex=0"> <AREA SHAPE="POLY" COORDS="156,112,157,108,250,135,250,135" title="DRAM = 1" href="xy_chart.jsp?section=DRAM&pieIndex=0"> <AREA SHAPE="POLY" COORDS="157,108,160,99,250,135,250,135" title="OTHER = 2" href="xy_chart.jsp?section=OTHER&pieIndex=0"> <AREA SHAPE="POLY" COORDS="160,99,168,83,179,69,192,58,207,48,250,135,250,135" title="QUALIF. REJECT = 16" href="xy_chart.jsp?section=QUALIF. REJECT&pieIndex=0"> <AREA SHAPE="POLY" COORDS="207,48,228,41,250,38,250,135,250,135" title="- = 10" href="xy_chart.jsp?section=-&pieIndex=0"> </MAP>
merci pour votre aide