Java JSP颗粒-禁用压缩
我正在我的一个项目中使用这个标记库 现在看起来不错,但我想做点像:Java JSP颗粒-禁用压缩,java,jsp,taglib,Java,Jsp,Taglib,我正在我的一个项目中使用这个标记库 现在看起来不错,但我想做点像: <granule:compress option="${param.disableCompression}" path="contextPath"> <link rel="stylesheet" href="/resources/bootstrap/css/bootstrap.css" type="text/css" /> <link rel="stylesheet" href="/
<granule:compress option="${param.disableCompression}" path="contextPath">
<link rel="stylesheet" href="/resources/bootstrap/css/bootstrap.css" type="text/css" />
<link rel="stylesheet" href="/resources/jquery.ui.all.css" type="text/css" />
<link rel="stylesheet" href="/resources/jquery.ui.theme.css" type="text/css" />
<link rel="stylesheet" href="/resources/style.css" type="text/css" />
</granule:compress>
目标是在url上传递disabledCompression=true参数,并在需要解决某些问题时禁用压缩。独立于环境。但仍在向其添加contextPath
有人用过这个标签库吗?或者一些类似的库可以帮助你
我制作了自己的标签,接受这个参数。像这样的
< c:choose>
<c:when test="${param.ignoreCompress eq 'true'}">
<jsp:doBody/>
</c:when>
<c:otherwise>
<jsp:doBody var="body" />
<granule:compress method="${param.ignoreCompress eq 'true' ? 'none':'closure'}" >
${body}
</granule:compress>
</c:otherwise>
</c:choose>
${body}