【问题标题】:Method coming from nowhere?不知从何而来的方法?
【发布时间】: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 中,因此...查找与之相关的&lt;c:if ...
  • 重点是没有&lt;c:if,其实有但是被评论了。
  • 我们需要比上面更多的上下文。我怀疑 &lt;c:if 没有正确注释或类似注释,但如果你不显示它......请参阅:minimal reproducible example
  • 其实我也没有更多的上下文。最后我让它运行改变了 if 的条件,即执行一个必须返回一些不需要的文本并使其执行任意代码的方法。谢谢!

标签: java jsp tomcat tomcat6


【解决方案1】:

在下一个 if 条件中使用方法会返回导致代码随机崩溃的不需要的文本。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-06-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多