调试 Apache Tomcat。哎呀! Google Chrome 无法连接。为什么?
我有下一个任务:在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1.) 没有双关语:您在修改 .sh 文件之后、运行startup.sh 之前是否停止了 tomcat?
2.) 检查 tomcat 日志是否有错误。
3.) 我以这种方式运行 Tomcat 进行调试:
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: