This tag can compare two texts and produce a compare-result.


Name Required Default Type Description
id false   String The result is stored in this variable.
originalText true   Object/String The original text.
modifiedText true   Object/String The modified text.

ID-result variable contains: A diff-string.


This example compares two texts and prints the result on the webpage.

<c:set var="org" value="The original text"/>
<c:set var="new" value="The new text"/>
<common:diff id="diffString" originalText="${org}" modifiedText="${new}"/>
Result was: <br/>
<c:out value="${diffString}" escapeXml="false"/><br/> 

comments powered by Disqus