Single Quote is converting to some special characters

23 Feb

Hi folks,

Recently i have faced one special character issue in JSP and got fixed, sharing with you all. Hope this will helps you. 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 i am 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 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.

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

Afte adding 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.

Happy Coding!.

Have a nice day.:-)

Leave a comment

Posted by on February 23, 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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: