RE: Servlet debug.

2002-06-24 Thread Adam Greene

I know this is probably late, but if all else fails, get Eclipse
(http://www.eclipse.org) and install the Tomcat plugin (on the community
page at Eclipse).  It allows you to load Tomcat inside of Eclipse and debug
it (just like JBuilder Professional or JBuilder Enterprise, I don't think
JBuilder Personal supports Tomcat Debugging).

Adam Greene
ROMulin Group Inc

885 Main St, Suite 16
Moncton, NB
E1C 1G5

Ph: (506) 863-1014 x4
Fx: (506) 854-6886

http://www.romulin.com/

-Original Message-
From: Christophe Bouhier (ECM) [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 12:20 AM
To: '[EMAIL PROTECTED]'
Subject: Servlet debug.

Hi,

I am using the JWSDP distribution of tomcat, and JBuilder 6 personal to
write servlets.
Everything is working fine for me: (Writting code, deploying using ant). I
spend some time
to write a suitable build.xml and this really pays off, as deploying new
code is really quick.

My next challenge is to debug the servlet. I looked around to get help, and
it seems possible to
launch tomcat from Jbuilder and be able to debug a servlet once a context is
activated.

Has anyone done this before? It seems you need to create a project, add the
tomcat libraries and creat a launcher
application. I need help with the main() method for the tomcat launcher.

Any help is welcome! TIA / Christophe



--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Servlet debug.

2002-06-24 Thread Christophe Bouhier (ECM)

Hi everyone / (Adam), 

I managed to get it working with Jbuilder 6 personal edition. 

First you need to add the Tomcat libraries in the Jbuilder classpath (By
creating multiple libraries and adding the libs in /common/lib  and /bin.
The /bin contains the bootstrap.jar which contains the 
Catalina main() method). 

Then write a small app with the following code:

import org.apache.catalina.startup.Catalina;

public class launcher {
  public static void main(String[] args) {
System.setProperty(org.xml.sax.parser,
   org.apache.xerces.parsers.SAXParser);

System.setProperty(javax.xml.parsers.DocumentBuilderFactory,
   org.apache.xerces.jaxp.DocumentBuilderFactoryImpl);

System.setProperty(catalina.base, c:\\jwsdp-1_0-ea2 );

String argC[] = { start };

Catalina.main( argC );

  }
}


Finally add your servlet code to this application and debug the launcher
class. 
Set a breakpoint somewhere in your servlet. when activating the servlet
context, the jbuilder debugger will stop at the breakpoint. This is really
awesome (and cheap!) 

Extra tip: Check the Catalina.main method in the source doc for more
argumnets to the main() method. 

Cheers / Christophe



-Original Message-
From: Adam Greene [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 8:50 PM
To: Tomcat Users List
Subject: RE: Servlet debug. 


I know this is probably late, but if all else fails, get Eclipse
(http://www.eclipse.org) and install the Tomcat plugin (on the community
page at Eclipse).  It allows you to load Tomcat inside of Eclipse and debug
it (just like JBuilder Professional or JBuilder Enterprise, I don't think
JBuilder Personal supports Tomcat Debugging).

Adam Greene
ROMulin Group Inc

885 Main St, Suite 16
Moncton, NB
E1C 1G5

Ph: (506) 863-1014 x4
Fx: (506) 854-6886

http://www.romulin.com/

-Original Message-
From: Christophe Bouhier (ECM) [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 12:20 AM
To: '[EMAIL PROTECTED]'
Subject: Servlet debug.

Hi,

I am using the JWSDP distribution of tomcat, and JBuilder 6 personal to
write servlets.
Everything is working fine for me: (Writting code, deploying using ant). I
spend some time
to write a suitable build.xml and this really pays off, as deploying new
code is really quick.

My next challenge is to debug the servlet. I looked around to get help, and
it seems possible to
launch tomcat from Jbuilder and be able to debug a servlet once a context is
activated.

Has anyone done this before? It seems you need to create a project, add the
tomcat libraries and creat a launcher
application. I need help with the main() method for the tomcat launcher.

Any help is welcome! TIA / Christophe



--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]