0

I am using AJAX to cal my struts action class and it's storing some data in session.

public String myMethod(){
     session.put("DATA", JSON_STRING); //JSON formatted string
     return "forward";
}

I am forwarding to a jsp page in which I am printing this data

<%@taglib prefix="s" uri="/struts-tags"%>
<s:property value="#session['DATA']" />

So in the end I am receiving the AJAX Call Response

[{&quot;title&quot;: &quot;OFP LALOUV0042/ODF96-02 PD/FP16 (L)&quot;, &quot;key&quot;: &quot;551&quot;}]

What I am expecting is

[{"title": "OFP LALOUV0042/ODF96-02 PD/FP16 (L)", "key": "551"}]
RaceBase
  • 18,428
  • 47
  • 141
  • 202
  • I don't agree on your approach, but in your case, this might be helpful: http://stackoverflow.com/questions/2241787/how-to-decode-encoded-special-xml-characters-in-a-string – gouki Mar 15 '13 at 07:56

1 Answers1

1

Try this:

<s:property value="#session['DATA']" escapeHtml="false" />
Foredoomed
  • 2,219
  • 2
  • 21
  • 39