问题
I am trying to use some string functions like trim or concat
using JSTL. I tried the following.
I tried adding <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
but I ended up with the error. I think this is for other JSTL version like 1.2 or 1.1
All I would need to know is how to use string function in JSTL 1.0
回答1:
JSTL 1.0 does not have the /jsp
part in the taglib URI. Remove that part.
<%@ taglib prefix="fn" uri="http://java.sun.com/jstl/functions" %>
See also:
- Our JSTL tag wiki page
Unrelated to the concrete problem, JSTL functions does not have trim()
and concat()
. You'd still need to look for a different solution to your concrete problem. For example, a custom EL function.
来源:https://stackoverflow.com/questions/10191001/jstl-1-0-string-functions