On Sun, 2007-11-11 at 06:41 -0800, ashayk wrote:
> Hello,
> 
> I'm trying to generate an offline snapshot of a Webstite using the
> CocoonBean.  I have no interest in using wget or similar screen scraping to
> accomplish this.  
> 
> I've researched the subject a bit, searched the forums, etc... but found
> little useful information.  I've tried using the CLI, but since it uses
> CocoonBean internally, I figure I'd like to make it work using CocoonBean
> itself.  FYI, there is a bug in cocoon.bat when running with the "cli" flag. 
> It attempts to load sevlet2.2.jar rather than servlet2.3.jar which Cocoon
> requires.  I get a ClassNotFoundException.

Did you found
http://cocoon.apache.org/2.1/userdocs/offline/index.html?

Why do you not use the CLI, which internally is using the CocoonBean?

We are using the cocoon cli in Apache Forrest. 

HTH

salu2

> 
> I've added all the relevant libraries to CLASSPATH, and am attempting the
> following code in order to generate the Web site.  The code runs fine, but
> fails to generate any meaningful output.  I suspect I'm not adding the
> target the right way.  I would greatly appreciate some help with this from
> someone who's managed it.
> 
> Thanks in advance,
> 
> Alex
> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> File context = new File("C:\\JavaProjects\\cocoon-2.1.10\\build\\webapp\\");
>  File work = new
> File("C:\\JavaProjects\\cocoon-2.1.10\\build\\webapp\\temp");
> 
>  File dest = new
> File("C:\\JavaProjects\\cocoon-2.1.10\\build\\webapp\\offline");
> 
> CocoonBean cocoon = new CocoonBean();
> cocoon.setFollowLinks(true);
> cocoon.setContextDir(context.getPath());
> cocoon.setWorkDir(work.getPath());
> cocoon.setDefaultFilename("index.html");
>             
> ArrayList list = new ArrayList();
> File index = 
>                     new
> File("C:\\JavaProjects\\cocoon-2.1.10\\build\\webapp\\simetry.com.au\\index.html");
> list.add(index.getPath());
> // guessing the problem is here
> // HOW DO I POINT CocoonBean AT THE sitemap.xmap FILE IN simetry.com.au
> ??????????
> cocoon.addTargets(list, dest.getPath());
>                    
>             
> cocoon.setLogLevel("INFO");
> 
> cocoon.initialize();
> cocoon.process();
> cocoon.dispose();
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


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

Reply via email to