JSTL 1.0字符串函数 [英] JSTL 1.0 String Functions
问题描述
我正在尝试通过JSTL使用某些字符串函数,例如trim或 concat
.我尝试了以下方法.
I am trying to use some string functions like trim or concat
using JSTL. I tried the following.
我尝试添加<%@ taglib prefix ="fn" uri ="http://java.sun.com/jsp/jstl/functions"%>
,但最终错误.我认为这适用于其他JSTL版本,例如1.2或1.1
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
我只需要知道如何在JSTL 1.0中使用字符串函数
All I would need to know is how to use string function in JSTL 1.0
推荐答案
JSTL 1.0在taglib URI中没有/jsp
部分.删除该部分.
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" %>
另请参见:
- 我们的JSTL标签Wiki页面
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.
这篇关于JSTL 1.0字符串函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!