大家好,第一次来这里提问,有不对的地方请多包涵。
题主目前在做一个登录注册的实验,机器是Mac,工具是IDEA和 Tomcat,在我的机器上已经可以运行了,但我把它导出war包放到服务器的Tomcat里,缺出现各种bug ,服务器连接失败,有一个jsp找不到servlet等等,但是我看不到具体的信息,第一次用服务器开发,很多不懂的,想请问大家都是怎么处理这种情况的?
三叔2016-11-02 11:21:25
VM 远程调试在启动程序时,将以下参数选项添加到自定义的命令行中,程序就会以支持RemoteDeubg的方式启动
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
在Tomcat中可以直接使用下面的命令启动远程调试
./catalina.sh jpda start
可通过以下几项配置修改参数值在(catalina.sh/bat)文件中
# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start" # command is executed. The default is "dt_socket". # # JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start" # command is executed. The default is localhost:8000. # # JPDA_SUSPEND (Optional) Java runtime options used when the "jpda start" # command is executed. Specifies whether JVM should suspend # execution immediately after startup. Default is "n". # # JPDA_OPTS (Optional) Java runtime options used when the "jpda start" # command is executed. If used, JPDA_TRANSPORT, JPDA_ADDRESS, # and JPDA_SUSPEND are ignored. Thus, all required jpda # options MUST be specified. The default is: # # -agentlib:jdwp=transport=$JPDA_TRANSPORT, # address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND