I’m trying to put together a String in a tag-library like this:
<c:set var="columnText" value="${fn:join(columnText,'.pdf')}" />
<a href="${fn:join('http://host:8082/pdf/',columnText)}" >bla</a>
However this exception occurs:
javax.el.ELException: Cannot convert abcedfg of type class java.lang.String to class [Ljava.lang.String;
‘abcdefg’ is the content of columnText at first.
It seems you are trying to do the equivalent of
but that is not the usage of
fn:join.joinrecieves an array and joins its elements using the second argument as a separator.Try with
By the way, if you wanted to put strings together you should have looked for help in concatenating strings, to find posts like this: Concatenate strings in JSP EL?