Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Debugging servlets (NEWBIE)
Debugging servlets (NEWBIE) [message #18765] Fri, 12 March 2004 11:24 Go to next message
Eclipse UserFriend
Hi,

I want to debug my sevlets from within eclipse. I am using the following
environment:
JDK1.2.2
Eclipse 3.0 (but with JRE1.4)
Tomcat 3.2.1 (this is very OLD version of Tomcat)
WinNT 4

As such, I cannot use the fancy plugin tools available becuase they do not
support anything below Tomcat 3.3. I have done a lot of reading but that
has not helped me so far.

Can you guys please help me. I simply need to step strough my servlet
code. I have compiled my servlet with debug="on" using ANT. From the
Run>Debug>Remote Application I try to connect to localhost at port 8000
(also 9876 and 5000) but I always get "failed to connect to remote VM.
Connection refused." message.

I read somewhere that Tomcat needs to be started in debug mode too. But I
do not know how to do that. I start tomcat from the DOS command line
running the startup.bat script. As suggested at some websites, by adding a
few java options such -Xdebug, and a lot more, I should be able to start
Tomcat in debug mode (I have seen these options in many places so I trust
them to be OK). But I do not know how and where to place them in the batch
script. Also, when I do place them, Tomcat crashes with the Dr.Watson
message.

I need help. Please advice.
Re: Debugging servlets (NEWBIE) [message #26437 is a reply to message #18765] Wed, 16 June 2004 02:32 Go to previous messageGo to next message
Eclipse UserFriend
Startup.bat called catalina.bat ,that is it's message.
Using CATALINA_BASE: ..
Using CATALINA_HOME: ..
Using CATALINA_TMPDIR: ..\temp
Using JAVA_HOME: C:\Program Files\j2sdk_nb\j2sdk1.4.2
Usage: catalina ( commands ... )
commands:
debug Start Catalina in a debugger
debug -security Debug Catalina with a security manager
jpda start Start Catalina under JPDA debugger
run Start Catalina in the current window
run -security Start in the current window with security manager
start Start Catalina in a separate window
start -security Start in a separate window with security manager
stop Stop Catalina


"Manoj" <manojbhardwaj@hotmail.com> ??????:c2so8h$hs2$1@eclipse.org...
> Hi,
>
> I want to debug my sevlets from within eclipse. I am using the following
> environment:
> JDK1.2.2
> Eclipse 3.0 (but with JRE1.4)
> Tomcat 3.2.1 (this is very OLD version of Tomcat)
> WinNT 4
>
> As such, I cannot use the fancy plugin tools available becuase they do not
> support anything below Tomcat 3.3. I have done a lot of reading but that
> has not helped me so far.
>
> Can you guys please help me. I simply need to step strough my servlet
> code. I have compiled my servlet with debug="on" using ANT. From the
> Run>Debug>Remote Application I try to connect to localhost at port 8000
> (also 9876 and 5000) but I always get "failed to connect to remote VM.
> Connection refused." message.
>
> I read somewhere that Tomcat needs to be started in debug mode too. But I
> do not know how to do that. I start tomcat from the DOS command line
> running the startup.bat script. As suggested at some websites, by adding a
> few java options such -Xdebug, and a lot more, I should be able to start
> Tomcat in debug mode (I have seen these options in many places so I trust
> them to be OK). But I do not know how and where to place them in the batch
> script. Also, when I do place them, Tomcat crashes with the Dr.Watson
> message.
>
> I need help. Please advice.
>
Re: Debugging servlets (NEWBIE) [message #26561 is a reply to message #26437] Wed, 16 June 2004 03:17 Go to previous message
Eclipse UserFriend
Originally posted by: dberindei.no.spam.yahoo.com

Manoj,

I'm able to debug Tomcat 4 by modifying startup.bat. These are the
changes I made:

1. I added the following lines at the top:
set JPDA_TRANSPORT=dt_socket
set JPDA_ADDRESS=8788

2. I modified the line that runs catalina.bat to look like this:
call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%

Then I could connect from Eclipse to the Tomcat VM on port 8788.

Hope it works for you too,
Dan


zwq00000 wrote:
> Startup.bat called catalina.bat ,that is it's message.
> Using CATALINA_BASE: ..
> Using CATALINA_HOME: ..
> Using CATALINA_TMPDIR: ..\temp
> Using JAVA_HOME: C:\Program Files\j2sdk_nb\j2sdk1.4.2
> Usage: catalina ( commands ... )
> commands:
> debug Start Catalina in a debugger
> debug -security Debug Catalina with a security manager
> jpda start Start Catalina under JPDA debugger
> run Start Catalina in the current window
> run -security Start in the current window with security manager
> start Start Catalina in a separate window
> start -security Start in a separate window with security manager
> stop Stop Catalina
>
>
> "Manoj" <manojbhardwaj@hotmail.com> ??????:c2so8h$hs2$1@eclipse.org...
>
>>Hi,
>>
>>I want to debug my sevlets from within eclipse. I am using the following
>>environment:
>>JDK1.2.2
>>Eclipse 3.0 (but with JRE1.4)
>>Tomcat 3.2.1 (this is very OLD version of Tomcat)
>>WinNT 4
>>
>>As such, I cannot use the fancy plugin tools available becuase they do not
>>support anything below Tomcat 3.3. I have done a lot of reading but that
>>has not helped me so far.
>>
>>Can you guys please help me. I simply need to step strough my servlet
>>code. I have compiled my servlet with debug="on" using ANT. From the
>>Run>Debug>Remote Application I try to connect to localhost at port 8000
>>(also 9876 and 5000) but I always get "failed to connect to remote VM.
>>Connection refused." message.
>>
>>I read somewhere that Tomcat needs to be started in debug mode too. But I
>>do not know how to do that. I start tomcat from the DOS command line
>>running the startup.bat script. As suggested at some websites, by adding a
>>few java options such -Xdebug, and a lot more, I should be able to start
>>Tomcat in debug mode (I have seen these options in many places so I trust
>>them to be OK). But I do not know how and where to place them in the batch
>>script. Also, when I do place them, Tomcat crashes with the Dr.Watson
>>message.
>>
>>I need help. Please advice.
>>
>
>
>
Previous Topic:JavaServer Faces support?
Next Topic:WebTools Creation Review
Goto Forum:
  


Current Time: Sun Jun 08 02:52:24 EDT 2025

Powered by FUDForum. Page generated in 0.03581 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top