I am passing a value as request attribute to the jsp page.
request.setAttribute("description", StringEscapeUtils.escapeHtml("Hello 1F World (Hello World) Hello World"));
In jsp Page I am setting in the pageContext
String text = (String) (String) request.getAttribute("description");
pageContext.setAttribute("description", text);
I have to send this text as a request parameter to the server. When I look in the firebug I see an error. I am trying to use "value" = "${text}"
which throws an error. What am I doing wrong?
SyntaxError: unterminated string literal
[Break On This Error]
{ "name": "description", "value": "
You should use StringEscapeUtils.escapeJava
going by the content of your string which doesn't have any HTML
StringEscapeUtils.escapeJava("Hello 1F World (Hello World) Hello World"));