arrays.jsp:
//...
var x = <c:out value="${x}"/>
<c:if test="${empty doExternal}">
processExternalArrays();
</c:if>
//...
Run Code Online (Sandbox Code Playgroud)
我想缩小/混淆大型JSP文件中包含的JavaScript,其中许多JSP/JSTL变量混合到JavaScript代码中,例如上面的代码片段.
代码依赖于使用服务器端逻辑填充的变量,然后传递给客户端代码,如上所述.
我已经使用YUI压缩器缩小了我的JS文件,但我不知道如何处理我的JSP中的JavaScript代码.
是否有可能缩小/混淆这段代码,因为它是动态创建的?
我需要string A根据它是否包含另一个单词中的所有单词来检查匹配string B- 无论顺序如何.
那么,让我们说string A是这样的:
one two three four five
Run Code Online (Sandbox Code Playgroud)
而string B就是其中之一:
one two three // match!
one three two // match! (order doesn't matter)
one two six // NOT A MATCH! ('six' is not found in string A)
one two three four // match!
one two three four five // match!
one two three four five seven // NOT A MATCH! ('seven' is not found in string A)
Run Code Online (Sandbox Code Playgroud)
我怎样才能找到匹配,string …