Neeme,

I didn't try myself, but the basic scheme for debugging servlets is the
following:

1) Modify the Tomcat startup script so JVM runs in the debugging mode - we
use something like the following:

C:\jdk1.3.1\jre\..\bin\java -classic -Xdebug -Xnoagent -Xrunjdwp:transport=d
t_socket,address=pjiricka-ws:1180,suspend=y -Djava.compiler=NONE
"-Xbootclasspath:C:\jdk1.3.1\jre\..\lib\tools.jar;C:\jdk1.3.1\jre\lib\rt.jar
;C:\jdk1.3.1\jre\lib\i18n.jar;C:\jdk1.3.1\jre\lib\sunrsasign.jar;C:\jdk1.3.1
\jre\classes;"   ..etc,

but this may differ based on your platform, JDK version etc. This involves a
bit of magic, so you may have to play with it a bit.

2) Set breakpoints in the IDE where you want them

3) In NetBeans, choose Debug -> Attach, and in the "Attach" dialog choose
Default Debugger (JPDA), SocketAttach, and port=1180 (the number you gave to
the VM in the Xrunjdwp parameter.

4) Invoke requests from your web browser, the debugger should stop on the
breakpoint.

Of course there are many possible combinations, like you can use the JDK 1.1
debugging architecture (which is not as stable as JPDA, though), you can use
shared memory access, etc.

There is a good overview of possible options at
http://java.sun.com/products/jpda/doc/conninv.html .

I hope this helps.

Petr


----- Original Message -----
From: "Neeme Praks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 23, 2001 2:12 PM
Subject: Tomcat 3.3 or 4.0 under Netbeans 3.2 anyone?


>
> Is there anyone out there who has gotten Tomcat 3.3 or 4.0 working under
> Netbeans 3.2 IDE?
> It doesn't have to be very integrated with the IDE, I just want to debug
my
> servlets, no JSP or anything...
>
> I tried, but due to the new (pretty advanced) classloading scheme, I'm not
> sure how to accomplish this...
>
> Can someone give some hints? Petr?
>
> Neeme
>

Reply via email to