Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/389.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java JSP颗粒-禁用压缩_Java_Jsp_Taglib - Fatal编程技术网

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}