code125.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>c:forTokens标签的使用</title>
</head>
<body>
<c:set var="sourceStr" value="Java Web:程序开发,范例宝典、模块大全;Java:自学手册,典型案例、指导手册;"></c:set>
<strong>原字符串:</strong><c:out value="${sourceStr}"></c:out>
<br>
<strong>分隔后的:</strong>
<br>
<c:forTokens items="${sourceStr}" delims=":,、;" var="item">
${item}<br>
</c:forTokens>
</body>
</html>