小编Osc*_*nes的帖子

如何在JSP/JSTL变量混合到其中的JSP中缩小/混淆JavaScript代码?

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代码.

是否有可能缩小/混淆这段代码,因为它是动态创建的?

javascript java obfuscation jsp jstl

8
推荐指数
1
解决办法
7727
查看次数

如何在一个字符串中搜索第二个字符串中包含的所有单词?

我需要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 …

javascript string jquery

2
推荐指数
1
解决办法
2592
查看次数

标签 统计

javascript ×2

java ×1

jquery ×1

jsp ×1

jstl ×1

obfuscation ×1

string ×1