Only fools use their mouth to speak. A smart man uses his brain, and a wise man uses his heart.- By Jack Ma - Founder of

Escape HTML using JSTL

Friday, October 17, 2014

Hello Friends,

If you are using JSTL to display HTML data in your application then you can escape HTML 2 ways in JSTL:

1) Using <c:out> tag
<c:out value="${specialCharString or HTML}" escapeXml="true"/> 

2) Using EL Function

${fn:escapeXml("<i> This is jignesh vachhani")} 

Hope this will be useful somewhere.

If you want to use Liferay API then you can simply use

HTMLUtil.escape(String HTMLString)

Find Duplicate Records MySQL Query

Friday, August 22, 2014

Hi All

I know that this is not related Liferay but i came across this useful thing during my development where you can find duplicate record from table and can delete if you need.

SELECT FROM tablename
INNER JOIN (SELECT name FROM tablename
GROUP BY name HAVING count(name) > 1) dup_record ON =