Java 如何使用jstl打印原始值旁边的随机值?
我使用JSTL在HTML页面中推送CSS 就像CSS名称是abc.CSS一样,由于缓存问题abc.CSS?time=21223233232使用JSTL,我想在CSS旁边附加时间戳Java 如何使用jstl打印原始值旁边的随机值?,java,jstl,jstl-functions,Java,Jstl,Jstl Functions,我使用JSTL在HTML页面中推送CSS 就像CSS名称是abc.CSS一样,由于缓存问题abc.CSS?time=21223233232使用JSTL,我想在CSS旁边附加时间戳 <c:forEach var="css" items="${styles}"> <link type="text/css" rel="stylesheet" href="/<c:url value="${css}"/>" /> </c:forEach> 目前
<c:forEach var="css" items="${styles}">
<link type="text/css" rel="stylesheet" href="/<c:url value="${css}"/>" />
</c:forEach>
目前,我正在使用这种方式将CSS推送到HTML页面
如何使用相同的代码附加时间戳参数?您需要将基本URL和时间部分作为变量。然后你必须“连接”它,比如
…href=“${css}?time=${time}”/>
同样的方式,href=“/?time=${time}/>
,而不需要我打字;)