This taglib lets encode a string according to the URLEncoding-scheme. Useful for sending parameters in url:s which contain special characters etc.


Name Required Default Type Description
id true   Object/String The result is stored in this variable.
value true   Object/String The string we want to encode.
encoding false UTF-8 Object/String The encoding you wish to encode it by.

ID-result variable contains: A string-object.


<%@ taglib uri="infoglue-common" prefix="common" %>
<%@ taglib uri="" prefix="c" %>

<common:URLEncode id="encodedString" value="This is a string we want to encode" encoding="UTF-8"/>

Encoded string: <c:out value="${encodedString}"/><br/>


This will result in that the variable "encodedString" will contain an URLEncoded string ("This+is+a+string+we+want+to+encode").


comments powered by Disqus