Single quote is converting to some special characters

22 Mar

Hi folks,

Recently i have faced one special character issue in JSP and got fixed, sharing with you all. Here is the post.

Requirement : Storing the JSP page fields like Name, Address and Email values in the Page1 and passing all these values to the next Page2. I have to send all these param values to the other system to display all these values in their system.

Issue : When passing these field values with single quote (like Name is Tes’t and Email is Tes’, single quote is converting to some special characters
(') when sending the values from Page1 to Page2. due to this it is faling to hit the other system.


I have added escapeXml=”false” in the JSP JSTL <c:out> tag.

escapeXml=”false” : The attribute value which is a must attribute and escapeXml attribute which takes a boolean value and is used to check whether there is any need to convert the &, <, > etc to their character encoding codes.

sample code here
var name = “<c:out value=”${}” escapeXml=”false”/>”;
 var emailId = “<c:out value=”${bean.emailId}” escapeXml=”false”/>”;

After making this modification, it is working as expected (Name is Tes’t and Email is Tes’

My Intension is sharing this issue is to reduce the developers time who has facing the same issue.

Look here for sample code:

Happy Coding!!.

Get glued to know more updates.

Have a nice day 🙂

Leave a comment

Posted by on March 22, 2013 in Uncategorized


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: