JSTL 1.0 String Functions

筅森魡賤 提交于 2021-02-05 07:54:14

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!