微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

java – JSP字符串格式截断

有没有人知道如何使用标签库在JSP中截断字符串?我要使用 Jakarta Taglibs,但是说它已经退休,因为:

With the advent of JSTL,the core features of many of the libraries had been standardized and the need for these libraries diminished. As such,much of the Taglibs codebase moved into maintenance mode.

解决方法

您可以使用 JSTL substring function
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

${fn:substring(myVariable,5)}

原文地址:https://www.jb51.cc/java/121957.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐