jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes Creating JSON object in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Creating JSON object in struts2" Watch "Creating JSON object in struts2" New topic
Author

Creating JSON object in struts2

James Peter
Ranch Hand

Joined: Sep 15, 2010
Posts: 115
Hi,

below is code in jsp



The string which comes in globalErrorMessage is

below is code in javascript



then I am getting below error.



Please let me know how to avoid this error.

if I put directly in jsp without using <s:property> then It is not showing any error.

Rgds
Peter
James Peter
Ranch Hand

Joined: Sep 15, 2010
Posts: 115
I found that we just need to add escape=false.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating JSON object in struts2
 
Similar Threads
struts2 with Jquery javascript issue
dyanmic part of the script tag does not get evaluated
Need help understanding Dojo Struts2 ajax tree generation
Need help with JSTL: setting end attribute dynamically of "substring" tag
<s:property value=""> in comparison