If you just need to know whether it is empty or empty, use the EL empty keyword:
<ui:fragment rendered="#{not empty bean.string}">
Or, if you really need to know its exact length, use the String#length() method directly:
<ui:fragment rendered="#{bean.string.length() gt 42}">
Or, if you are not already using Servlet 3.0 / EL 2.2, use JSTL fn:length() :
<ui:fragment rendered="#{fn:length(bean.string) gt 42}">
source share