调试 Apache Tomcat。哎呀! Google Chrome 无法连接。为什么?

发布于 2025-01-03 23:43:12 字数 751 浏览 1 评论 0原文

我有下一个任务:在 Eclipse 中调试 Apache Tomcat。

我的步骤:

  • 运行 Tomcat: ./startup.sh
  • 检查 - 在浏览器中打开 localhost:8080/MyProject - 成功。
  • 在文件 catalina.sh 中,我添加了下一行:

export JPDA_ADDRESS=8000 导出JPDA_TRANSPORT=dt_socket

  • 在文件startup.sh

:我注释掉这一行:

#exec "$PRGDIR"/"$EXECUTABLE" start "$@"

并添加下一行:

exec "$PRGDIR"/"$EXECUTABLE" jpda start "$@"

  • 运行 Tomcat: startup.sh
  • 检查 -在浏览器中尝试打开 localhost:8080/MyProject - 失败。 在下一步中,我将尝试在 Eclipse 中添加用于远程调试 Tomcat 的设置,但上一步失败。

为什么会发生这种情况?

也许,这取决于操作系统类型?我使用Ubuntu 11.10...

I have next task: Debug Apache Tomcat in Eclipse.

My steps:

  • Run Tomcat: ./startup.sh
  • Check - open in browser localhost:8080/MyProject - SUCCESS.
  • in file catalina.sh I added next lines:

export JPDA_ADDRESS=8000
export JPDA_TRANSPORT=dt_socket

  • in file startup.sh:

I comment this line:

#exec "$PRGDIR"/"$EXECUTABLE" start "$@"

and added next line:

exec "$PRGDIR"/"$EXECUTABLE" jpda start "$@"

  • Run Tomcat: startup.sh
  • Check - in browser try open localhost:8080/MyProject - FAIL.
    At the next step I will try add settings in Eclipse for remote debug Tomcat, but I have Fail on previous step.

Why did this happen??

Maybe, it is depends on OS type? I use Ubuntu 11.10...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人间☆小暴躁 2025-01-10 23:43:12

1.) 没有双关语:您在修改 .sh 文件之后、运行startup.sh 之前是否停止了 tomcat?

2.) 检查 tomcat 日志是否有错误。

3.) 我以这种方式运行 Tomcat 进行调试:

  • 使用以下内容创建了 MyCatalinaStart.sh(Windows 上的 bat)

导出JPDA_ADDRESS=8000

导出 JPDA_TRANSPORT=dt_socket

导出 JPDA_SUSPEND=n

catalina.sh jpda启动

  • 从中启动 Tomcat。 sh 或 bat 文件不需要修改,它们已准备好接收输入

1.) No pun intended: did you stop tomcat after modifying .sh files and before runing startup.sh?

2.) Check tomcat log for errors.

3.) I run Tomcat on debug this way:

  • Created a MyCatalinaStart.sh (bat on windows) with the following

export JPDA_ADDRESS=8000

export JPDA_TRANSPORT=dt_socket

export JPDA_SUSPEND=n

catalina.sh jpda start

  • Started Tomcat from it. The sh or bat files require NO modification, they came ready to receive inputs
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文