cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve K <>
Subject Re: Eclipse debugging (was Re: [GT2003] Thank you)
Date Wed, 08 Oct 2003 17:02:51 GMT
Upayavira wrote:
> Start Cocoon with cocoon  servlet-debug (instead of just cocoon servlet)
> Then, in eclipse, select run/debug...
> Click remove java application, then new at the bottom.
> Select your cocoon project. Click apply/debug.

The way I've been debugging cocoon is by extending the CocoonWrapper 
class and adding a slightly different version of the processURI() method 
that returns the status rather than throwing a ProcessingException on 
failure.  Then I have a Main class (actually, it is a ExcaliburTestCase 
class) that does the following:


CocoonTester cocoon = new CocoonTester();
ByteArrayOutputStream baos = new ByteArrayOutputStream();


cocoon.processURIStatus("test/", baos);


Note that CocoonTester is my subclass of CocoonWrapper, and 
debug-logkit.xconf is a modified version of the regular cocoon 
logkit.xconf that uses the stream target to log everything to System.out.

This is the beginnings of my effort to come up with a way to start unit 
testing cocoon pipelines.  It is easier than dealing with remote 
debugging, and dumping all the logs to the console is helpful as well. 
I'm looking into a way to send requests to cocoon using the 
SitemapSource rather than cocoon.process() to request a page since I'd 
like to get back SAX events rather than bytes.


View raw message