【发布时间】:2017-05-08 07:39:51
【问题描述】:
我收到此错误:
Error in line: 87 in file jsp: /modules/login/pages/loginExtranet.jsp
The method setTest(boolean) in the type IfTag is not applicable for the arguments ()
84: <span>*</span>
.
.
.
周围的代码是这样的:
<div>
<label for="pass">
Pass
</label>
<input type="password" value="" id="pass" name="j_password"
onfocus="this.value=''; this.onfocus=null;" />
<span>*</span>
</div>
setTest 来自哪里?感觉是内部jsp方法什么的,不明白为什么会出现这个错误...
【问题讨论】:
-
那个 JavaScript 代码与产生错误的 Java 代码无关。该错误表明它位于
IfTag中,因此...查找与之相关的<c:if ...。 -
重点是没有
<c:if,其实有但是被评论了。 -
我们需要比上面更多的上下文。我怀疑
<c:if没有正确注释或类似注释,但如果你不显示它......请参阅:minimal reproducible example -
其实我也没有更多的上下文。最后我让它运行改变了 if 的条件,即执行一个必须返回一些不需要的文本并使其执行任意代码的方法。谢谢!