【问题标题】:eclipse stops responding while running a .jsp fileeclipse 在运行 .jsp 文件时停止响应
【发布时间】:2021-11-10 09:24:29
【问题描述】:

我在 Eclipse 中创建了一个基本的动态 Web 项目。 我的jsp文件包含以下代码

<html>
<head>
<title>Insert title here</title>
</head>
<body>
   this is the sum of 5 and 3 <%com.testing.SumOfNumbers.addTwoNumbers(3,5); %>
</body>
</html>

在“com.testing”包中,我使用 addTwoNumbers 方法创建了 SumOfNumbers 类。

package com.testing;

public class SumOfNumbers {
        public static int addTwoNumbers(int a,int b)
        {
            return a+b;
        }
}

我已经下载了tomcat v10.0 服务器。 我尝试了几次但结果相同。不知道问题出在哪里,是tomcat服务器还是eclipse的bug?

提前致谢。

【问题讨论】:

    标签: eclipse jsp tomcat


    【解决方案1】:

    这不太可能是您的代码,尽管您使用的是 scriptlet 而不是表达式,因此总和不会像您预期的那样出现在输出中。

    https://wiki.eclipse.org/How_to_report_a_deadlock 包含有关如何获取堆栈转储以查看发生了什么的说明。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-10-19
      • 1970-01-01
      • 1970-01-01
      • 2015-07-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-13
      相关资源
      最近更新 更多