On Mar 17, 2008, at 11:15 AM, Grzegorz Kossakowski wrote:
Vadim Gritsenko pisze:
External HTTP crawler is not a replacement for cocoon embedding
APIs (which what our CLI was, allows you to embed cocoon and use it
from within another java application, together with simple main()
wrapper).
I believe that similar effect could be achieved by application
imitating DispatcherServlet from SSF. If application wants to embed
Cocoon it should do basic initialization that DispatcherServlet does
and call SitemapServlet.forward() method. Of course that means the
application would need to implement few classes imitating
ServletContext, Request, Respone but I don't it's that hard...
WDYT?
Yep. That's exactly how it was done -- see:
http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/commandline/
Vadim