Re: Cocoon CLI Command Line Interface - Basic Question

2004-05-14 Thread Simon Mieth
On Thu, 13 May 2004, David Swearingen wrote:

 I'm trying to get Cocoon CLI to work.  I've scoured all the documents on this, but 
 can't figure out how cli knows where to find my sitemap.  I have cocoon up and 
 running just fine under Tomcat as a web application.
  
 What I need is a very basic command line -- which commands are REQUIRED to simply 
 process a request through the sitemap and output to a file?  I'd rather just put all 
 the required parameters on the command line rather than have to build an xconf file. 
  It seems to me that the minimum parameters needed if I DON'T reference an xconf 
 file are:
  
 -c contextdir (unless I use default)
 -d destination
  
 Part of my confusion in part stems from the fact that I have my sitemap under my 
 Tomcat folder (c:\jakarta-tomcat-4.1.30) but the docs say to run cocoon.bat residing 
 in my cocoon install directory, c:\cocoon-2.1.4. So, should my 'contextdir' be under 
 the jakarta path or the cocoon path?  What is the purpose of the contextdir?  That's 
 not explained in the docs.
  
 Finally, it's not clear to me what the difference is between -x and -C.
  
 The page that ostensibly explains all this is 
 http://cocoon.apache.org/2.1/userdocs/offline/cli.html
  
 Thanks,
 David

Hi David,

the usage of cocoon cli -c ... -d ... myuri.html will only works inside 
the directory of cocoon source distribution. 
You dont need (it is not possible) point to your sitemap.xmap, the 
main-sitemap should be in the contextdir, so you have to point to the 
right contextdir. 
If you want to use your deployed webapp under tomcat, you have 3 options 
to do this.

1.) you have the same cocoon-version as source package somewhere on the 
filesystem (c:\cocoon-2.1.4?) and it is build. You can use the cocoon.bat 
script there. Go to 
this folder and try cocoon -c c:\jakarta-tomact-4.1.30\webapps\cocoon -d 
c:\myoutput mystarting-uri.html

2.) You can use java org.apache.cocoon.Main -c ... -d  myhtml, 
but you have to put all libs from the webapp (WEB-INF\libs) to the classpath 
(by a script). 

3.) You can use the ant-task (see the user-doc), where ant will add all 
libs to the classpath/classloader.

The difference between -x and -C:

-C: point to the cocoon.xconf, where the cocoon-components are confiured

-x: point to a CLI-configuration-file, where you have setup all options 
and uris for the Cocoon-CLI, so you dont need any switches then.


If you run in a ClassNotFound exception you have to add the 
servlet_2_2.jar form c:\cocoon-2.1.4\lib\optional to the 
build\webapp\WEB-INF\lib if you use option 1)

Yes, the -c and the -d switch are only required. 


I hope it helps.

Best Regards,

Simon


 


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



Re: Cocoon CLI Command Line Interface - Basic Question

2004-05-14 Thread Upayavira
David Swearingen wrote:

I'm trying to get Cocoon CLI to work.  I've scoured all the documents 
on this, but can't figure out how cli knows where to find my sitemap.  
I have cocoon up and running just fine under Tomcat as a web application.
 
What I need is a very basic command line -- which commands are 
REQUIRED to simply process a request through the sitemap and output to 
a file?  I'd rather just put all the required parameters on the 
command line rather than have to build an xconf file.  It seems to me 
that the minimum parameters needed if I DON'T reference an xconf file are:
 
-c contextdir (unless I use default)
-d destination
You are probably right. (But it is some time since I have used the CLI 
with command line parameters).

Part of my confusion in part stems from the fact that I have my 
sitemap under my Tomcat folder (c:\jakarta-tomcat-4.1.30) but the docs 
say to run cocoon.bat residing in my cocoon install directory, 
c:\cocoon-2.1.4. So, should my 'contextdir' be under the jakarta path 
or the cocoon path?  What is the purpose of the contextdir?  That's 
not explained in the docs.
The context directory is the directory that contains your Cocoon webapp, 
the one with the WEB-INF folder in it.

From within your Cocoon distribution, you should probably be able to do:

cocoon cli -c c:\jakarta-tomcat-4.1.30\webapps\cocoon -d c:\mysite\ 
index.html

The index.html file will be generated, and it will crawl pages linked to 
from there (unless you specify -f false, I think).

 
Finally, it's not clear to me what the difference is between -x and -C.
 
-x says use a cli.xconf file to configure the command line. -C points to 
the configuration file for Cocoon, cocoon.xconf, which can be found in 
WEB-INF.

Hope that is some help - all done from memory, I'm afraid.

Upayavira



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


Cocoon CLI Command Line Interface - Basic Question

2004-05-13 Thread David Swearingen
I'm trying to get Cocoon CLI to work. I've scoured all the documents on this, but can't figure out how cli knows where to find my sitemap. I have cocoon up and running just fine under Tomcat as a web application.

What I need is a very basic command line -- which commands are REQUIRED to simply process a request through the sitemap and output to a file? I'd rather just put all the required parameters on the command line rather than have to build an xconf file. It seems to me that the minimum parameters needed if I DON'T reference an xconf file are:

-c contextdir (unless I use default)
-d destination

Part of my confusion in part stems from the fact that I have my sitemap under my Tomcat folder (c:\jakarta-tomcat-4.1.30) but the docs say to run cocoon.bat residing in my cocoon install directory, c:\cocoon-2.1.4.So, should my 'contextdir' be under the jakarta path or the cocoon path? What is the purpose of the contextdir? That's not explained in the docs.

Finally, it's not clear to me what the difference is between -x and -C.

The page that ostensibly explains all this is http://cocoon.apache.org/2.1/userdocs/offline/cli.html

Thanks,
David