I am looking to create a Java web application that includes a JSP page. However, when I load the page, I encounter the following error:
SyntaxError: missing ; before statement
The code for my JSP page is as follows:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
...
...
</html>
When debugging in Chrome, the error occurs at this line:
var orgJson = '${reqOrgJson}';
I receive the following JSONArray:
["XYZ","ASD.'s Group","SDF' Memorial Hospital","Fenchâçè Fâçè, Mr. - PCVC"]
The issue arises from the presence of an apostrophe in the data being assigned to orgJson
. Can someone provide guidance on how to resolve this problem? I am working with Java and using Eclipse.