Note that there are some explanatory texts on larger screens.

plurals
  1. POStruts2 displaying json data on a jsp file with &quote
    text
    copied!<p>Hi i am struggling to give JSON feed as event source to full calendar.I tried different methods but not worked for me(ex. return type as json in Struts2 it shows 500 error). Now i came up with a solution facing small issue like given below.</p> <p>Codes and configurations-what i have</p> <p>1) Action class with a property.</p> <p>class JsonDemoAction{ private String data; // have all needed code here like getters/setters method etc... }</p> <p>2) In struts.xml maps result to jsondemo.jsp</p> <p>3) content of jsondemo.jsp</p> <pre><code>&lt;%@ page contentType="application/json"%&gt; &lt;%@ taglib prefix="s" uri="/struts-tags"%&gt; &lt;s:property value="data"/&gt; </code></pre> <p>Problem i am facing</p> <p>1) The string data has content </p> <p>[{"id":1,"title":"Task in Progress1","start":"2013-12-28","end":"2013-12-29"}, {"id":2,"title":"Task in Progress2","start":"2013-12-26","end":"2013-12-28"}] </p> <p>2) The jsondemo.jsp gives output</p> <pre><code>[{&amp;quot;id&amp;quot;:1,&amp;quot;title&amp;quot;:&amp;quot;Task in Progress1&amp;quot;,&amp;quot;start&amp;quot;:&amp;quot;2013-12-28&amp;quot;,&amp;quot;end&amp;quot;:&amp;quot;2013-12-29&amp;quot;},{&amp;quot;id&amp;quot;:2,&amp;quot;title&amp;quot;:&amp;quot;Task in Progress2&amp;quot;,&amp;quot;start&amp;quot;:&amp;quot;2013-12-26&amp;quot;,&amp;quot;end&amp;quot;:&amp;quot;2013-12-28&amp;quot;}] </code></pre> <p>3) I need get the out put as double quote itself not like <code>&amp;quot;</code> what can i do for that?</p> <p>4) if i hard code the json data directly into jsondemo.jsp the calender displays events, no problem.</p> <p>So finally "Can i avoid the conversion of " to <code>&amp;quot</code>" is it problem of struts2?Is there any solution to achieve this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload