title: How to substring in Struts2?
body: <p>How can I substring a string using Struts2 taglibs?</p>
  
  <p>This is my attempt using JSTL/EL:</p>
  
  <pre><code>&lt;%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %&gt;
  &lt;%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %&gt;
  ...
  &lt;s:property value="firstName" /&gt;
  &lt;c:set var="string" value="${firstName} "/&gt;
  &lt;c:out value="${fn:substring(string,0,5)} "/&gt;
  </code></pre>
  
  <p>This does however not work. How can I achieve my requirement?</p>