Thursday, 2 October 2014

JSP/JSTL EL lastIndexOf

References
http://www.willuhn.de/blog/index.php?/archives/425-lastIndexOf-in-JSTL.html
http://www.tutorialspoint.com/jsp/jstl_function_substring.htm

Example:
<c:set var="text" value="This is a bunch of text" />
<c:set var="splittext" value="${fn:split(text,' ')}" />
${fn:indexOf(text, splittext[fn:length(splittext)-1])}

No comments:

Post a Comment