You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Justin Makeig <li...@makeig.com> on 2003/10/19 02:01:17 UTC

Command line interface

I've read the documentation and the Wiki as well the most recent CLI threads
in July and earlier this month. However, I can't seem to figure out how to
configure the cli.xconf for my webapp.

The site I'm building is dynamic, using Cocoon 2.1.1 to transform aggregated
XML docs at run-time. Part of this aggregation is a static table of contents
(TOC) document that is generated at design-time with a transform on Cocoon's
directory generator output.

<map:match pattern="toc">
    <map:generate src="xml/site" type="directory">
        <map:parameter name="depth" value="10"/>
    </map:generate>
    <map:transform src="xsl/gentoc.xsl"/>
    <map:serialize type="xml"/>
</map:match>

I request http://server:8080/toc to generate the XML in my browser. By hand,
I paste the resulting XML into a file called toc.xml. This is a mind
numbingly arduous process that I hoped to automate in the deployment process
with Ant. However, the first step is generating toc.xml with Cocoon's
command line interface. Because I need to use the directory generator, I
don't see a way around this.

To install Cocoon 2.1.1, I built a minimalist WAR that I deployed in Tomcat.
This, of course, doesn¹t include all of the goodies in the build directory
of the installation directory. Where do I put my custom cli.xconf file? In
my cocoon-2.1.2/build directory or in my tomcat/webapps/cocoon directory?
Also, given my path confusion, I'm not sure how to set the <context-dir>,
<config-file>, <work-dir>, and <dest-dir> elements. Finally, is this the
correct <uri> for generating the URL http://server:8080/toc into the file
site/xml/toc.xml within tomcat/webapps/cocoon?

<uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>

Here are the interesting parts of my cli.xconf (currently located in
tomcat/webapps/cocoon/):

<context-dir>
 /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde
</context-dir>
<config-file>
 /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.xconf
</config-file>
<work-dir>build/work</work-dir>
<dest-dir>
 /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml
</dest-dir>

...

<uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>

Run from the commandline using

./cocoon.sh cli -x /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf

I'm getting the error

Cannot find CatalogManager.properties
Exception in thread "main" java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.NoClassDefFoundError:
javax/servlet/http/HttpServletRequest

I'm very confused. Any help would be much appreciated.

- Justin Makeig


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Command line interface

Posted by Upayavira <uv...@upaya.co.uk>.
Justin Makeig wrote:

>Upayavira,
>Thanks for all of your help. Let me know if you get your CLI Ant task
>running. I'd be curious to see how you got it to work. In the meantime, I'm
>going to require tomcat to be running to build the TOC. Here's the simple
>Ant target that I wrote:
>
><target
>    name="buildTOC"
>    depends="deployXML"
>    description="Builds the table of contents">
>    <get src="${toc.uri}" dest="${toc.path}"/>
></target>
>  
>
Ah no. Go get the build target from xml-forrest project. They just use 
the <java> task to call the CLI, which works. My task just allows you to 
specify your config in the build file, rather than a separate cli.xconf.

Regards, Upayavira

>It's kind of kludgy and pretty slow, but it does the job.
>
>- Justin 
>
>On 10/20/03 11:20 PM, "Upayavira" <uv...@upaya.co.uk> wrote:
>
>  
>
>>Justin Makeig wrote:
>>
>>    
>>
>>>My goal, however, is to ultimately put this into an Ant task so that a
>>>developer would not need to have tomcat up and running to build the toc.
>>>Maybe this is unreasonable.
>>> 
>>>
>>>      
>>>
>>No that is not unreasonable.
>>
>>I have written an Ant task specifically for that. Unfortunately, it
>>works for me, but not for the one person who has tested it so far.
>>
>>Regards, Upayavira
>>
>>    
>>
>>>- Justin
>>>
>>>On 10/20/03 11:48 AM, "Upayavira" <uv...@upaya.co.uk> wrote:
>>>
>>> 
>>>
>>>      
>>>
>>>>Justin,
>>>>
>>>>You could try Lars' mail, or you could take a completely different tack:
>>>>
>>>>Use the SourceWritingTransformer in a secret pipeline that generates
>>>>your data, and then writes it to a file using the SourceWritingTransformer.
>>>>
>>>>Regards, Upayavira
>>>>
>>>>
>>>>Justin Makeig wrote:
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>Argh. After struggling with cocoon.sh and Upayavira's helpful email, I
>>>>>still
>>>>>can't get the CLI to work. I just need to push the result of
>>>>>http://localhost:8080/toc into the the file
>>>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml. I've
>>>>>attached the relevant configuration below. Any help would be much
>>>>>appreciated. Thanks.
>>>>>
>>>>>- Justin
>>>>>
>>>>>Tomcat
>>>>>======
>>>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon
>>>>>  cde/
>>>>>      sitemap.xmap
>>>>>  cli.xconf
>>>>>  sitemap.xmap -> offloads logic to cde/sitemap.xmap
>>>>>  WEB-INF/
>>>>>
>>>>>CLI script
>>>>>==========
>>>>>/usr/local/cocoon/cocoon-2.1.1
>>>>>  cocoon.sh
>>>>>
>>>>>
>>>>>cli.xconf
>>>>>=========
>>>>><cocoon verbose="true"
>>>>>  follow-links="false"
>>>>>  precompile-only="false"
>>>>>  confirm-extensions="false">
>>>>>
>>>>>  
>>>>><context-dir>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon</context-dir>
>>>>>
>>>>>          
>>>>>
><config-file>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon>>>>
>.
>  
>
>>>>>xconf</config-file>
>>>>>  <work-dir>build/work</work-dir>
>>>>>  
>>>>>  <accept>*/*</accept>
>>>>>  
>>>>>  <include pattern="**"/>
>>>>>  <exclude pattern="docs/apidocs/**"/>
>>>>>  <uri
>>>>>      type="replace"
>>>>>      src-prefix=""
>>>>>      src="toc"
>>>>>      
>>>>>dest="/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml"/>
>>>>></cocoon>
>>>>>
>>>>>command line
>>>>>============
>>>>>./cocoon.sh cli -x
>>>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf
>>>>>
>>>>>Excpetions
>>>>>==========
>>>>>Exception in thread "main" java.lang.reflect.InvocationTargetException
>>>>>...
>>>>>Caused by: java.lang.NoClassDefFoundError:
>>>>>javax/servlet/http/HttpServletRequest
>>>>>
>>>>>
>>>>>On 10/18/03 11:43 PM, "Upayavira" <uv...@upaya.co.uk> wrote:
>>>>>
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>>>Justin,
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>I've read the documentation and the Wiki as well the most recent CLI
>>>>>>>threads
>>>>>>>in July and earlier this month. However, I can't seem to figure out how
>>>>>>>to
>>>>>>>configure the cli.xconf for my webapp.
>>>>>>>
>>>>>>>The site I'm building is dynamic, using Cocoon 2.1.1 to transform
>>>>>>>aggregated
>>>>>>>XML docs at run-time. Part of this aggregation is a static table of
>>>>>>>contents
>>>>>>>(TOC) document that is generated at design-time with a transform on
>>>>>>>Cocoon's
>>>>>>>directory generator output.
>>>>>>>
>>>>>>><map:match pattern="toc">
>>>>>>> <map:generate src="xml/site" type="directory">
>>>>>>>     <map:parameter name="depth" value="10"/>
>>>>>>> </map:generate>
>>>>>>> <map:transform src="xsl/gentoc.xsl"/>
>>>>>>> <map:serialize type="xml"/>
>>>>>>></map:match>
>>>>>>>
>>>>>>>I request http://server:8080/toc to generate the XML in my browser. By
>>>>>>>hand,
>>>>>>>I paste the resulting XML into a file called toc.xml. This is a mind
>>>>>>>numbingly arduous process that I hoped to automate in the deployment
>>>>>>>process
>>>>>>>with Ant. However, the first step is generating toc.xml with Cocoon's
>>>>>>>command line interface. Because I need to use the directory generator, I
>>>>>>>don't see a way around this.
>>>>>>>
>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>Shouldn't be a problem.
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>To install Cocoon 2.1.1, I built a minimalist WAR that I deployed in
>>>>>>>Tomcat.
>>>>>>>This, of course, doesn¹t include all of the goodies in the build
>>>>>>>directory
>>>>>>>of the installation directory. Where do I put my custom cli.xconf file?
>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>Anywhere. But it must be referred to via an absolute path, or relative
>>>>>>to the cocoon.sh file.
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>In
>>>>>>>my cocoon-2.1.2/build directory or in my tomcat/webapps/cocoon directory?
>>>>>>>Also, given my path confusion, I'm not sure how to set the <context-dir>,
>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>The root of your webapp - the folder containing your sitemap.xmap and
>>>>>>your WEB-INF folder.
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>>><config-file>,
>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>Path, from your config directory (or absolute) to your cocoon.xconf
>>>>>>(optional)
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>>><work-dir>, 
>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>A working directory, can be anywhere.
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>and <dest-dir> elements.
>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>The folder where you want your files written (if not specified in a
>>>>>><uri> node @dest attribute. Therefore not relevent in your case.
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>Finally, is this the
>>>>>>>correct <uri> for generating the URL http://server:8080/toc into the file
>>>>>>>site/xml/toc.xml within tomcat/webapps/cocoon?
>>>>>>>
>>>>>>><uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>>>>>>>
>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>Yup. That looks fine.
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>Here are the interesting parts of my cli.xconf (currently located in
>>>>>>>tomcat/webapps/cocoon/):
>>>>>>>
>>>>>>><context-dir>
>>>>>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde
>>>>>>></context-dir>
>>>>>>><config-file>
>>>>>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.xconf
>>>>>>></config-file>
>>>>>>><work-dir>build/work</work-dir>
>>>>>>><dest-dir>
>>>>>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml
>>>>>>></dest-dir>
>>>>>>>
>>>>>>>...
>>>>>>>
>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>Your config file path is missing 'cde' I think.
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>>><uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>>>>>>>
>>>>>>>Run from the commandline using
>>>>>>>
>>>>>>>./cocoon.sh cli -x
>>>>>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf
>>>>>>>
>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>The cocoon.sh script is configured to work off a built Cocoon with the
>>>>>>webapp in build/webapp. You can try setting COCOON_HOME environment
>>>>>>variable to the path to your webapp (same as context-dir) before running
>>>>>>it.
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>I'm getting the error
>>>>>>>
>>>>>>>Cannot find CatalogManager.properties
>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>You can ignore that one. Now fixed in latest Cocoon in CVS.
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>Exception in thread "main" java.lang.reflect.InvocationTargetException
>>>>>>>...
>>>>>>>Caused by: java.lang.NoClassDefFoundError:
>>>>>>>javax/servlet/http/HttpServletRequest
>>>>>>>
>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>You need to have servlet2_X.jar in your classpath, which is defined in
>>>>>>cocoon.sh.
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>I'm very confused. Any help would be much appreciated.
>>>>>>>
>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>Does that help?
>>>>>>
>>>>>>Regards, Upayavira
>>>>>>
>>>>>>
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>>>>For additional commands, e-mail: users-help@cocoon.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>>>For additional commands, e-mail: users-help@cocoon.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>>For additional commands, e-mail: users-help@cocoon.apache.org
>>>>
>>>>
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>>> 
>>>
>>>      
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Command line interface

Posted by Justin Makeig <li...@makeig.com>.
Upayavira,
Thanks for all of your help. Let me know if you get your CLI Ant task
running. I'd be curious to see how you got it to work. In the meantime, I'm
going to require tomcat to be running to build the TOC. Here's the simple
Ant target that I wrote:

<target
    name="buildTOC"
    depends="deployXML"
    description="Builds the table of contents">
    <get src="${toc.uri}" dest="${toc.path}"/>
</target>

It's kind of kludgy and pretty slow, but it does the job.

- Justin 

On 10/20/03 11:20 PM, "Upayavira" <uv...@upaya.co.uk> wrote:

> Justin Makeig wrote:
> 
>> My goal, however, is to ultimately put this into an Ant task so that a
>> developer would not need to have tomcat up and running to build the toc.
>> Maybe this is unreasonable.
>>  
>> 
> No that is not unreasonable.
> 
> I have written an Ant task specifically for that. Unfortunately, it
> works for me, but not for the one person who has tested it so far.
> 
> Regards, Upayavira
> 
>> - Justin
>> 
>> On 10/20/03 11:48 AM, "Upayavira" <uv...@upaya.co.uk> wrote:
>> 
>>  
>> 
>>> Justin,
>>> 
>>> You could try Lars' mail, or you could take a completely different tack:
>>> 
>>> Use the SourceWritingTransformer in a secret pipeline that generates
>>> your data, and then writes it to a file using the SourceWritingTransformer.
>>> 
>>> Regards, Upayavira
>>> 
>>> 
>>> Justin Makeig wrote:
>>> 
>>>    
>>> 
>>>> Argh. After struggling with cocoon.sh and Upayavira's helpful email, I
>>>> still
>>>> can't get the CLI to work. I just need to push the result of
>>>> http://localhost:8080/toc into the the file
>>>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml. I've
>>>> attached the relevant configuration below. Any help would be much
>>>> appreciated. Thanks.
>>>> 
>>>> - Justin
>>>> 
>>>> Tomcat
>>>> ======
>>>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon
>>>>   cde/
>>>>       sitemap.xmap
>>>>   cli.xconf
>>>>   sitemap.xmap -> offloads logic to cde/sitemap.xmap
>>>>   WEB-INF/
>>>> 
>>>> CLI script
>>>> ==========
>>>> /usr/local/cocoon/cocoon-2.1.1
>>>>   cocoon.sh
>>>> 
>>>> 
>>>> cli.xconf
>>>> =========
>>>> <cocoon verbose="true"
>>>>   follow-links="false"
>>>>   precompile-only="false"
>>>>   confirm-extensions="false">
>>>> 
>>>>   
>>>> <context-dir>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon</context-dir>
>>>> 
<config-file>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon>>>>
.
>>>> xconf</config-file>
>>>>   <work-dir>build/work</work-dir>
>>>>   
>>>>   <accept>*/*</accept>
>>>>   
>>>>   <include pattern="**"/>
>>>>   <exclude pattern="docs/apidocs/**"/>
>>>>   <uri
>>>>       type="replace"
>>>>       src-prefix=""
>>>>       src="toc"
>>>>       
>>>> dest="/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml"/>
>>>> </cocoon>
>>>> 
>>>> command line
>>>> ============
>>>> ./cocoon.sh cli -x
>>>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf
>>>> 
>>>> Excpetions
>>>> ==========
>>>> Exception in thread "main" java.lang.reflect.InvocationTargetException
>>>> ...
>>>> Caused by: java.lang.NoClassDefFoundError:
>>>> javax/servlet/http/HttpServletRequest
>>>> 
>>>> 
>>>> On 10/18/03 11:43 PM, "Upayavira" <uv...@upaya.co.uk> wrote:
>>>> 
>>>> 
>>>> 
>>>>      
>>>> 
>>>>> Justin,
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>>>> I've read the documentation and the Wiki as well the most recent CLI
>>>>>> threads
>>>>>> in July and earlier this month. However, I can't seem to figure out how
>>>>>> to
>>>>>> configure the cli.xconf for my webapp.
>>>>>> 
>>>>>> The site I'm building is dynamic, using Cocoon 2.1.1 to transform
>>>>>> aggregated
>>>>>> XML docs at run-time. Part of this aggregation is a static table of
>>>>>> contents
>>>>>> (TOC) document that is generated at design-time with a transform on
>>>>>> Cocoon's
>>>>>> directory generator output.
>>>>>> 
>>>>>> <map:match pattern="toc">
>>>>>>  <map:generate src="xml/site" type="directory">
>>>>>>      <map:parameter name="depth" value="10"/>
>>>>>>  </map:generate>
>>>>>>  <map:transform src="xsl/gentoc.xsl"/>
>>>>>>  <map:serialize type="xml"/>
>>>>>> </map:match>
>>>>>> 
>>>>>> I request http://server:8080/toc to generate the XML in my browser. By
>>>>>> hand,
>>>>>> I paste the resulting XML into a file called toc.xml. This is a mind
>>>>>> numbingly arduous process that I hoped to automate in the deployment
>>>>>> process
>>>>>> with Ant. However, the first step is generating toc.xml with Cocoon's
>>>>>> command line interface. Because I need to use the directory generator, I
>>>>>> don't see a way around this.
>>>>>> 
>>>>>> 
>>>>>>     
>>>>>> 
>>>>>>          
>>>>>> 
>>>>> Shouldn't be a problem.
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>>>> To install Cocoon 2.1.1, I built a minimalist WAR that I deployed in
>>>>>> Tomcat.
>>>>>> This, of course, doesn¹t include all of the goodies in the build
>>>>>> directory
>>>>>> of the installation directory. Where do I put my custom cli.xconf file?
>>>>>> 
>>>>>>     
>>>>>> 
>>>>>>          
>>>>>> 
>>>>> Anywhere. But it must be referred to via an absolute path, or relative
>>>>> to the cocoon.sh file.
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>>>> In
>>>>>> my cocoon-2.1.2/build directory or in my tomcat/webapps/cocoon directory?
>>>>>> Also, given my path confusion, I'm not sure how to set the <context-dir>,
>>>>>> 
>>>>>>     
>>>>>> 
>>>>>>          
>>>>>> 
>>>>> The root of your webapp - the folder containing your sitemap.xmap and
>>>>> your WEB-INF folder.
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>>>> <config-file>,
>>>>>> 
>>>>>>     
>>>>>> 
>>>>>>          
>>>>>> 
>>>>> Path, from your config directory (or absolute) to your cocoon.xconf
>>>>> (optional)
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>>>> <work-dir>, 
>>>>>> 
>>>>>>     
>>>>>> 
>>>>>>          
>>>>>> 
>>>>> A working directory, can be anywhere.
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>>>> and <dest-dir> elements.
>>>>>> 
>>>>>>     
>>>>>> 
>>>>>>          
>>>>>> 
>>>>> The folder where you want your files written (if not specified in a
>>>>> <uri> node @dest attribute. Therefore not relevent in your case.
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>>>> Finally, is this the
>>>>>> correct <uri> for generating the URL http://server:8080/toc into the file
>>>>>> site/xml/toc.xml within tomcat/webapps/cocoon?
>>>>>> 
>>>>>> <uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>>>>>> 
>>>>>> 
>>>>>>     
>>>>>> 
>>>>>>          
>>>>>> 
>>>>> Yup. That looks fine.
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>>>> Here are the interesting parts of my cli.xconf (currently located in
>>>>>> tomcat/webapps/cocoon/):
>>>>>> 
>>>>>> <context-dir>
>>>>>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde
>>>>>> </context-dir>
>>>>>> <config-file>
>>>>>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.xconf
>>>>>> </config-file>
>>>>>> <work-dir>build/work</work-dir>
>>>>>> <dest-dir>
>>>>>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml
>>>>>> </dest-dir>
>>>>>> 
>>>>>> ...
>>>>>> 
>>>>>> 
>>>>>>     
>>>>>> 
>>>>>>          
>>>>>> 
>>>>> Your config file path is missing 'cde' I think.
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>>>> <uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>>>>>> 
>>>>>> Run from the commandline using
>>>>>> 
>>>>>> ./cocoon.sh cli -x
>>>>>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf
>>>>>> 
>>>>>> 
>>>>>>     
>>>>>> 
>>>>>>          
>>>>>> 
>>>>> The cocoon.sh script is configured to work off a built Cocoon with the
>>>>> webapp in build/webapp. You can try setting COCOON_HOME environment
>>>>> variable to the path to your webapp (same as context-dir) before running
>>>>> it.
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>>>> I'm getting the error
>>>>>> 
>>>>>> Cannot find CatalogManager.properties
>>>>>> 
>>>>>>     
>>>>>> 
>>>>>>          
>>>>>> 
>>>>> You can ignore that one. Now fixed in latest Cocoon in CVS.
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>>>> Exception in thread "main" java.lang.reflect.InvocationTargetException
>>>>>> ...
>>>>>> Caused by: java.lang.NoClassDefFoundError:
>>>>>> javax/servlet/http/HttpServletRequest
>>>>>> 
>>>>>> 
>>>>>>     
>>>>>> 
>>>>>>          
>>>>>> 
>>>>> You need to have servlet2_X.jar in your classpath, which is defined in
>>>>> cocoon.sh.
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>>>> I'm very confused. Any help would be much appreciated.
>>>>>> 
>>>>>> 
>>>>>>     
>>>>>> 
>>>>>>          
>>>>>> 
>>>>> Does that help?
>>>>> 
>>>>> Regards, Upayavira
>>>>> 
>>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>>> 
>>>>> 
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>> 
>>>> 
>>>> 
>>>> 
>>>>      
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>> 
>>> 
>>> 
>>>    
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>> 
>> 
>>  
>> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Command line interface

Posted by Upayavira <uv...@upaya.co.uk>.
Justin Makeig wrote:

>My goal, however, is to ultimately put this into an Ant task so that a
>developer would not need to have tomcat up and running to build the toc.
>Maybe this is unreasonable.
>  
>
No that is not unreasonable.

I have written an Ant task specifically for that. Unfortunately, it 
works for me, but not for the one person who has tested it so far.

Regards, Upayavira

>- Justin
>
>On 10/20/03 11:48 AM, "Upayavira" <uv...@upaya.co.uk> wrote:
>
>  
>
>>Justin,
>>
>>You could try Lars' mail, or you could take a completely different tack:
>>
>>Use the SourceWritingTransformer in a secret pipeline that generates
>>your data, and then writes it to a file using the SourceWritingTransformer.
>>
>>Regards, Upayavira
>>
>>
>>Justin Makeig wrote:
>>
>>    
>>
>>>Argh. After struggling with cocoon.sh and Upayavira's helpful email, I still
>>>can't get the CLI to work. I just need to push the result of
>>>http://localhost:8080/toc into the the file
>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml. I've
>>>attached the relevant configuration below. Any help would be much
>>>appreciated. Thanks.
>>>
>>>- Justin
>>>
>>>Tomcat
>>>======
>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon
>>>   cde/
>>>       sitemap.xmap
>>>   cli.xconf
>>>   sitemap.xmap -> offloads logic to cde/sitemap.xmap
>>>   WEB-INF/
>>>
>>>CLI script
>>>==========
>>>/usr/local/cocoon/cocoon-2.1.1
>>>   cocoon.sh
>>>
>>>
>>>cli.xconf
>>>=========
>>><cocoon verbose="true"
>>>   follow-links="false"
>>>   precompile-only="false"
>>>   confirm-extensions="false">
>>>
>>>   
>>><context-dir>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon</context-dir>
>>><config-file>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.
>>>xconf</config-file>
>>>   <work-dir>build/work</work-dir>
>>>   
>>>   <accept>*/*</accept>
>>>   
>>>   <include pattern="**"/>
>>>   <exclude pattern="docs/apidocs/**"/>
>>>   <uri
>>>       type="replace"
>>>       src-prefix=""
>>>       src="toc"
>>>       
>>>dest="/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml"/>
>>></cocoon>
>>>
>>>command line
>>>============
>>>./cocoon.sh cli -x /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf
>>>
>>>Excpetions
>>>==========
>>>Exception in thread "main" java.lang.reflect.InvocationTargetException
>>>...
>>>Caused by: java.lang.NoClassDefFoundError:
>>>javax/servlet/http/HttpServletRequest
>>>
>>>
>>>On 10/18/03 11:43 PM, "Upayavira" <uv...@upaya.co.uk> wrote:
>>>
>>> 
>>>
>>>      
>>>
>>>>Justin,
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>I've read the documentation and the Wiki as well the most recent CLI
>>>>>threads
>>>>>in July and earlier this month. However, I can't seem to figure out how to
>>>>>configure the cli.xconf for my webapp.
>>>>>
>>>>>The site I'm building is dynamic, using Cocoon 2.1.1 to transform
>>>>>aggregated
>>>>>XML docs at run-time. Part of this aggregation is a static table of
>>>>>contents
>>>>>(TOC) document that is generated at design-time with a transform on
>>>>>Cocoon's
>>>>>directory generator output.
>>>>>
>>>>><map:match pattern="toc">
>>>>>  <map:generate src="xml/site" type="directory">
>>>>>      <map:parameter name="depth" value="10"/>
>>>>>  </map:generate>
>>>>>  <map:transform src="xsl/gentoc.xsl"/>
>>>>>  <map:serialize type="xml"/>
>>>>></map:match>
>>>>>
>>>>>I request http://server:8080/toc to generate the XML in my browser. By
>>>>>hand,
>>>>>I paste the resulting XML into a file called toc.xml. This is a mind
>>>>>numbingly arduous process that I hoped to automate in the deployment
>>>>>process
>>>>>with Ant. However, the first step is generating toc.xml with Cocoon's
>>>>>command line interface. Because I need to use the directory generator, I
>>>>>don't see a way around this.
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>Shouldn't be a problem.
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>To install Cocoon 2.1.1, I built a minimalist WAR that I deployed in
>>>>>Tomcat.
>>>>>This, of course, doesn¹t include all of the goodies in the build directory
>>>>>of the installation directory. Where do I put my custom cli.xconf file?
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>Anywhere. But it must be referred to via an absolute path, or relative
>>>>to the cocoon.sh file.
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>In
>>>>>my cocoon-2.1.2/build directory or in my tomcat/webapps/cocoon directory?
>>>>>Also, given my path confusion, I'm not sure how to set the <context-dir>,
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>The root of your webapp - the folder containing your sitemap.xmap and
>>>>your WEB-INF folder.
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>><config-file>,
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>Path, from your config directory (or absolute) to your cocoon.xconf
>>>>(optional)
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>><work-dir>, 
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>A working directory, can be anywhere.
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>and <dest-dir> elements.
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>The folder where you want your files written (if not specified in a
>>>><uri> node @dest attribute. Therefore not relevent in your case.
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>Finally, is this the
>>>>>correct <uri> for generating the URL http://server:8080/toc into the file
>>>>>site/xml/toc.xml within tomcat/webapps/cocoon?
>>>>>
>>>>><uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>Yup. That looks fine.
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>Here are the interesting parts of my cli.xconf (currently located in
>>>>>tomcat/webapps/cocoon/):
>>>>>
>>>>><context-dir>
>>>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde
>>>>></context-dir>
>>>>><config-file>
>>>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.xconf
>>>>></config-file>
>>>>><work-dir>build/work</work-dir>
>>>>><dest-dir>
>>>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml
>>>>></dest-dir>
>>>>>
>>>>>...
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>Your config file path is missing 'cde' I think.
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>><uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>>>>>
>>>>>Run from the commandline using
>>>>>
>>>>>./cocoon.sh cli -x
>>>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>The cocoon.sh script is configured to work off a built Cocoon with the
>>>>webapp in build/webapp. You can try setting COCOON_HOME environment
>>>>variable to the path to your webapp (same as context-dir) before running it.
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>I'm getting the error
>>>>>
>>>>>Cannot find CatalogManager.properties
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>You can ignore that one. Now fixed in latest Cocoon in CVS.
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>Exception in thread "main" java.lang.reflect.InvocationTargetException
>>>>>...
>>>>>Caused by: java.lang.NoClassDefFoundError:
>>>>>javax/servlet/http/HttpServletRequest
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>You need to have servlet2_X.jar in your classpath, which is defined in
>>>>cocoon.sh.
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>I'm very confused. Any help would be much appreciated.
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>Does that help?
>>>>
>>>>Regards, Upayavira
>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>>For additional commands, e-mail: users-help@cocoon.apache.org
>>>>
>>>>
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>>> 
>>>
>>>      
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Command line interface

Posted by Justin Makeig <li...@makeig.com>.
My goal, however, is to ultimately put this into an Ant task so that a
developer would not need to have tomcat up and running to build the toc.
Maybe this is unreasonable.

- Justin

On 10/20/03 11:48 AM, "Upayavira" <uv...@upaya.co.uk> wrote:

> Justin,
> 
> You could try Lars' mail, or you could take a completely different tack:
> 
> Use the SourceWritingTransformer in a secret pipeline that generates
> your data, and then writes it to a file using the SourceWritingTransformer.
> 
> Regards, Upayavira
> 
> 
> Justin Makeig wrote:
> 
>> Argh. After struggling with cocoon.sh and Upayavira's helpful email, I still
>> can't get the CLI to work. I just need to push the result of
>> http://localhost:8080/toc into the the file
>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml. I've
>> attached the relevant configuration below. Any help would be much
>> appreciated. Thanks.
>> 
>> - Justin
>> 
>> Tomcat
>> ======
>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon
>>    cde/
>>        sitemap.xmap
>>    cli.xconf
>>    sitemap.xmap -> offloads logic to cde/sitemap.xmap
>>    WEB-INF/
>> 
>> CLI script
>> ==========
>> /usr/local/cocoon/cocoon-2.1.1
>>    cocoon.sh
>> 
>> 
>> cli.xconf
>> =========
>> <cocoon verbose="true"
>>    follow-links="false"
>>    precompile-only="false"
>>    confirm-extensions="false">
>> 
>>    
>> <context-dir>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon</context-dir>
>> <config-file>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.
>> xconf</config-file>
>>    <work-dir>build/work</work-dir>
>>    
>>    <accept>*/*</accept>
>>    
>>    <include pattern="**"/>
>>    <exclude pattern="docs/apidocs/**"/>
>>    <uri
>>        type="replace"
>>        src-prefix=""
>>        src="toc"
>>        
>> dest="/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml"/>
>> </cocoon>
>> 
>> command line
>> ============
>> ./cocoon.sh cli -x /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf
>> 
>> Excpetions
>> ==========
>> Exception in thread "main" java.lang.reflect.InvocationTargetException
>> ...
>> Caused by: java.lang.NoClassDefFoundError:
>> javax/servlet/http/HttpServletRequest
>> 
>> 
>> On 10/18/03 11:43 PM, "Upayavira" <uv...@upaya.co.uk> wrote:
>> 
>>  
>> 
>>> Justin,
>>> 
>>>    
>>> 
>>>> I've read the documentation and the Wiki as well the most recent CLI
>>>> threads
>>>> in July and earlier this month. However, I can't seem to figure out how to
>>>> configure the cli.xconf for my webapp.
>>>> 
>>>> The site I'm building is dynamic, using Cocoon 2.1.1 to transform
>>>> aggregated
>>>> XML docs at run-time. Part of this aggregation is a static table of
>>>> contents
>>>> (TOC) document that is generated at design-time with a transform on
>>>> Cocoon's
>>>> directory generator output.
>>>> 
>>>> <map:match pattern="toc">
>>>>   <map:generate src="xml/site" type="directory">
>>>>       <map:parameter name="depth" value="10"/>
>>>>   </map:generate>
>>>>   <map:transform src="xsl/gentoc.xsl"/>
>>>>   <map:serialize type="xml"/>
>>>> </map:match>
>>>> 
>>>> I request http://server:8080/toc to generate the XML in my browser. By
>>>> hand,
>>>> I paste the resulting XML into a file called toc.xml. This is a mind
>>>> numbingly arduous process that I hoped to automate in the deployment
>>>> process
>>>> with Ant. However, the first step is generating toc.xml with Cocoon's
>>>> command line interface. Because I need to use the directory generator, I
>>>> don't see a way around this.
>>>> 
>>>> 
>>>>      
>>>> 
>>> Shouldn't be a problem.
>>> 
>>>    
>>> 
>>>> To install Cocoon 2.1.1, I built a minimalist WAR that I deployed in
>>>> Tomcat.
>>>> This, of course, doesn¹t include all of the goodies in the build directory
>>>> of the installation directory. Where do I put my custom cli.xconf file?
>>>> 
>>>>      
>>>> 
>>> Anywhere. But it must be referred to via an absolute path, or relative
>>> to the cocoon.sh file.
>>> 
>>>    
>>> 
>>>> In
>>>> my cocoon-2.1.2/build directory or in my tomcat/webapps/cocoon directory?
>>>> Also, given my path confusion, I'm not sure how to set the <context-dir>,
>>>> 
>>>>      
>>>> 
>>> The root of your webapp - the folder containing your sitemap.xmap and
>>> your WEB-INF folder.
>>> 
>>>    
>>> 
>>>> <config-file>,
>>>> 
>>>>      
>>>> 
>>> Path, from your config directory (or absolute) to your cocoon.xconf
>>> (optional)
>>> 
>>>    
>>> 
>>>> <work-dir>, 
>>>> 
>>>>      
>>>> 
>>> A working directory, can be anywhere.
>>> 
>>>    
>>> 
>>>> and <dest-dir> elements.
>>>> 
>>>>      
>>>> 
>>> The folder where you want your files written (if not specified in a
>>> <uri> node @dest attribute. Therefore not relevent in your case.
>>> 
>>>    
>>> 
>>>> Finally, is this the
>>>> correct <uri> for generating the URL http://server:8080/toc into the file
>>>> site/xml/toc.xml within tomcat/webapps/cocoon?
>>>> 
>>>> <uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>>>> 
>>>> 
>>>>      
>>>> 
>>> Yup. That looks fine.
>>> 
>>>    
>>> 
>>>> Here are the interesting parts of my cli.xconf (currently located in
>>>> tomcat/webapps/cocoon/):
>>>> 
>>>> <context-dir>
>>>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde
>>>> </context-dir>
>>>> <config-file>
>>>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.xconf
>>>> </config-file>
>>>> <work-dir>build/work</work-dir>
>>>> <dest-dir>
>>>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml
>>>> </dest-dir>
>>>> 
>>>> ...
>>>> 
>>>> 
>>>>      
>>>> 
>>> Your config file path is missing 'cde' I think.
>>> 
>>>    
>>> 
>>>> <uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>>>> 
>>>> Run from the commandline using
>>>> 
>>>> ./cocoon.sh cli -x
>>>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf
>>>> 
>>>> 
>>>>      
>>>> 
>>> The cocoon.sh script is configured to work off a built Cocoon with the
>>> webapp in build/webapp. You can try setting COCOON_HOME environment
>>> variable to the path to your webapp (same as context-dir) before running it.
>>> 
>>>    
>>> 
>>>> I'm getting the error
>>>> 
>>>> Cannot find CatalogManager.properties
>>>> 
>>>>      
>>>> 
>>> You can ignore that one. Now fixed in latest Cocoon in CVS.
>>> 
>>>    
>>> 
>>>> Exception in thread "main" java.lang.reflect.InvocationTargetException
>>>> ...
>>>> Caused by: java.lang.NoClassDefFoundError:
>>>> javax/servlet/http/HttpServletRequest
>>>> 
>>>> 
>>>>      
>>>> 
>>> You need to have servlet2_X.jar in your classpath, which is defined in
>>> cocoon.sh.
>>> 
>>>    
>>> 
>>>> I'm very confused. Any help would be much appreciated.
>>>> 
>>>> 
>>>>      
>>>> 
>>> Does that help?
>>> 
>>> Regards, Upayavira
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>> 
>>> 
>>> 
>>>    
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>> 
>> 
>>  
>> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Command line interface

Posted by Upayavira <uv...@upaya.co.uk>.
Justin,

You could try Lars' mail, or you could take a completely different tack:

Use the SourceWritingTransformer in a secret pipeline that generates 
your data, and then writes it to a file using the SourceWritingTransformer.

Regards, Upayavira


Justin Makeig wrote:

>Argh. After struggling with cocoon.sh and Upayavira's helpful email, I still
>can't get the CLI to work. I just need to push the result of
>http://localhost:8080/toc into the the file
>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml. I've
>attached the relevant configuration below. Any help would be much
>appreciated. Thanks.
>
>- Justin
>
>Tomcat
>======
>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon
>    cde/
>        sitemap.xmap
>    cli.xconf
>    sitemap.xmap -> offloads logic to cde/sitemap.xmap
>    WEB-INF/
>
>CLI script
>==========
>/usr/local/cocoon/cocoon-2.1.1
>    cocoon.sh
>
>
>cli.xconf
>=========
><cocoon verbose="true"
>    follow-links="false"
>    precompile-only="false"
>    confirm-extensions="false">
>
>    
><context-dir>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon</context-dir>
><config-file>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.
>xconf</config-file>
>    <work-dir>build/work</work-dir>
>    
>    <accept>*/*</accept>
>    
>    <include pattern="**"/>
>    <exclude pattern="docs/apidocs/**"/>
>    <uri
>        type="replace"
>        src-prefix=""
>        src="toc"
>        
>dest="/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml"/>
></cocoon>
>
>command line
>============
>./cocoon.sh cli -x /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf
>
>Excpetions
>==========
>Exception in thread "main" java.lang.reflect.InvocationTargetException
>...
>Caused by: java.lang.NoClassDefFoundError:
>javax/servlet/http/HttpServletRequest
>
>
>On 10/18/03 11:43 PM, "Upayavira" <uv...@upaya.co.uk> wrote:
>
>  
>
>>Justin,
>>
>>    
>>
>>>I've read the documentation and the Wiki as well the most recent CLI threads
>>>in July and earlier this month. However, I can't seem to figure out how to
>>>configure the cli.xconf for my webapp.
>>>
>>>The site I'm building is dynamic, using Cocoon 2.1.1 to transform aggregated
>>>XML docs at run-time. Part of this aggregation is a static table of contents
>>>(TOC) document that is generated at design-time with a transform on Cocoon's
>>>directory generator output.
>>>
>>><map:match pattern="toc">
>>>   <map:generate src="xml/site" type="directory">
>>>       <map:parameter name="depth" value="10"/>
>>>   </map:generate>
>>>   <map:transform src="xsl/gentoc.xsl"/>
>>>   <map:serialize type="xml"/>
>>></map:match>
>>>
>>>I request http://server:8080/toc to generate the XML in my browser. By hand,
>>>I paste the resulting XML into a file called toc.xml. This is a mind
>>>numbingly arduous process that I hoped to automate in the deployment process
>>>with Ant. However, the first step is generating toc.xml with Cocoon's
>>>command line interface. Because I need to use the directory generator, I
>>>don't see a way around this.
>>> 
>>>
>>>      
>>>
>>Shouldn't be a problem.
>>
>>    
>>
>>>To install Cocoon 2.1.1, I built a minimalist WAR that I deployed in Tomcat.
>>>This, of course, doesn¹t include all of the goodies in the build directory
>>>of the installation directory. Where do I put my custom cli.xconf file?
>>>
>>>      
>>>
>>Anywhere. But it must be referred to via an absolute path, or relative
>>to the cocoon.sh file.
>>
>>    
>>
>>>In
>>>my cocoon-2.1.2/build directory or in my tomcat/webapps/cocoon directory?
>>>Also, given my path confusion, I'm not sure how to set the <context-dir>,
>>>
>>>      
>>>
>>The root of your webapp - the folder containing your sitemap.xmap and
>>your WEB-INF folder.
>>
>>    
>>
>>><config-file>, 
>>>
>>>      
>>>
>>Path, from your config directory (or absolute) to your cocoon.xconf
>>(optional)
>>
>>    
>>
>>><work-dir>, 
>>>
>>>      
>>>
>>A working directory, can be anywhere.
>>
>>    
>>
>>>and <dest-dir> elements.
>>>
>>>      
>>>
>>The folder where you want your files written (if not specified in a
>><uri> node @dest attribute. Therefore not relevent in your case.
>>
>>    
>>
>>>Finally, is this the
>>>correct <uri> for generating the URL http://server:8080/toc into the file
>>>site/xml/toc.xml within tomcat/webapps/cocoon?
>>>
>>><uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>>> 
>>>
>>>      
>>>
>>Yup. That looks fine.
>>
>>    
>>
>>>Here are the interesting parts of my cli.xconf (currently located in
>>>tomcat/webapps/cocoon/):
>>>
>>><context-dir>
>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde
>>></context-dir>
>>><config-file>
>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.xconf
>>></config-file>
>>><work-dir>build/work</work-dir>
>>><dest-dir>
>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml
>>></dest-dir>
>>>
>>>...
>>> 
>>>
>>>      
>>>
>>Your config file path is missing 'cde' I think.
>>
>>    
>>
>>><uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>>>
>>>Run from the commandline using
>>>
>>>./cocoon.sh cli -x /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf
>>> 
>>>
>>>      
>>>
>>The cocoon.sh script is configured to work off a built Cocoon with the
>>webapp in build/webapp. You can try setting COCOON_HOME environment
>>variable to the path to your webapp (same as context-dir) before running it.
>>
>>    
>>
>>>I'm getting the error
>>>
>>>Cannot find CatalogManager.properties
>>>
>>>      
>>>
>>You can ignore that one. Now fixed in latest Cocoon in CVS.
>>
>>    
>>
>>>Exception in thread "main" java.lang.reflect.InvocationTargetException
>>>...
>>>Caused by: java.lang.NoClassDefFoundError:
>>>javax/servlet/http/HttpServletRequest
>>> 
>>>
>>>      
>>>
>>You need to have servlet2_X.jar in your classpath, which is defined in
>>cocoon.sh.
>>
>>    
>>
>>>I'm very confused. Any help would be much appreciated.
>>> 
>>>
>>>      
>>>
>>Does that help?
>>
>>Regards, Upayavira
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Command line interface

Posted by Simon Mieth <si...@t-online.de>.
On Tue, 21 Oct 2003 07:19:13 +0100
Upayavira <uv...@upaya.co.uk> wrote:

> Try recompiling Cocoon without the Deli block (and exclude session-fw 
> whilst you're at it).
> 
> Regards, Upayavira

Hi,

another solution is to strip down the "cocoon.xconf" file to related components, which are needed for CLI-processing.

I removed all deli,portal-framework,session,hsqldb-components and it works fine for me. 

I think with a modified cocoon.xconf, rebuilding without some blocks will not needed.


Regards,

Simon  

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Command line interface

Posted by Upayavira <uv...@upaya.co.uk>.
Try recompiling Cocoon without the Deli block (and exclude session-fw 
whilst you're at it).

Regards, Upayavira

Justin Makeig wrote:

>Lars,
>Thanks for the quick response. I tried your suggestion and now I'm getting a
>different error:
>
>java.lang.NullPointerException
>        at java.io.Reader.<init>(Reader.java:61)
>        at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
>        at com.hp.hpl.deli.Workspace.getResource(Workspace.java:620)
>
>...
>
>java.net.MalformedURLException
>* [0] toc
>
>Any ideas what this might be? I imagine I've got a path wrong, but I can't
>tell which one it might be.
>
><context-dir>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon</context-dir>
><config-file>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.
>xconf</config-file>
><work-dir>build/work</work-dir>
>
><uri
>   type="replace"
>   src-prefix=""
>   src="toc"
>   dest="/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml"/>
>
>Thanks again.
>
>- Justin
>
>On 10/20/03 11:40 AM, "Lars Huttar" <la...@sil.org> wrote:
>
>  
>
>>>From: Justin Makeig
>>>
>>>Argh. After struggling with cocoon.sh and Upayavira's helpful
>>>email, I still
>>>can't get the CLI to work. I just need to push the result of
>>>http://localhost:8080/toc into the the file
>>>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml. I've
>>>attached the relevant configuration below. Any help would be much
>>>appreciated. Thanks.
>>>
>>>- Justin
>>>
>>>      
>>>
>>...
>>
>>    
>>
>>>Excpetions
>>>==========
>>>Exception in thread "main" java.lang.reflect.InvocationTargetException
>>>...
>>>Caused by: java.lang.NoClassDefFoundError:
>>>javax/servlet/http/HttpServletRequest
>>>      
>>>
>>It sounds like servlet_2_2.jar is not in your path.
>>
>>I had an error like this and fixed it by copying
>> lib/optional/servlet_2_2.jar
>>to
>> build/webapp/WEB-INF/lib/
>>in the source distribution.
>>
>>Lars
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Command line interface

Posted by Justin Makeig <li...@makeig.com>.
Lars,
Thanks for the quick response. I tried your suggestion and now I'm getting a
different error:

java.lang.NullPointerException
        at java.io.Reader.<init>(Reader.java:61)
        at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
        at com.hp.hpl.deli.Workspace.getResource(Workspace.java:620)

...

java.net.MalformedURLException
* [0] toc

Any ideas what this might be? I imagine I've got a path wrong, but I can't
tell which one it might be.

<context-dir>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon</context-dir>
<config-file>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.
xconf</config-file>
<work-dir>build/work</work-dir>

<uri
   type="replace"
   src-prefix=""
   src="toc"
   dest="/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml"/>

Thanks again.

- Justin

On 10/20/03 11:40 AM, "Lars Huttar" <la...@sil.org> wrote:

>> From: Justin Makeig
>> 
>> Argh. After struggling with cocoon.sh and Upayavira's helpful
>> email, I still
>> can't get the CLI to work. I just need to push the result of
>> http://localhost:8080/toc into the the file
>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml. I've
>> attached the relevant configuration below. Any help would be much
>> appreciated. Thanks.
>> 
>> - Justin
>> 
> ...
> 
>> Excpetions
>> ==========
>> Exception in thread "main" java.lang.reflect.InvocationTargetException
>> ...
>> Caused by: java.lang.NoClassDefFoundError:
>> javax/servlet/http/HttpServletRequest
> 
> 
> It sounds like servlet_2_2.jar is not in your path.
> 
> I had an error like this and fixed it by copying
>  lib/optional/servlet_2_2.jar
> to
>  build/webapp/WEB-INF/lib/
> in the source distribution.
> 
> Lars
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Command line interface

Posted by Lars Huttar <la...@sil.org>.
> From: Justin Makeig
> 
> Argh. After struggling with cocoon.sh and Upayavira's helpful 
> email, I still
> can't get the CLI to work. I just need to push the result of
> http://localhost:8080/toc into the the file
> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml. I've
> attached the relevant configuration below. Any help would be much
> appreciated. Thanks.
> 
> - Justin
> 
...

> Excpetions
> ==========
> Exception in thread "main" java.lang.reflect.InvocationTargetException
> ...
> Caused by: java.lang.NoClassDefFoundError:
> javax/servlet/http/HttpServletRequest


It sounds like servlet_2_2.jar is not in your path.

I had an error like this and fixed it by copying
   lib/optional/servlet_2_2.jar
to
   build/webapp/WEB-INF/lib/
in the source distribution.

Lars


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Command line interface

Posted by Justin Makeig <li...@makeig.com>.
Argh. After struggling with cocoon.sh and Upayavira's helpful email, I still
can't get the CLI to work. I just need to push the result of
http://localhost:8080/toc into the the file
/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml. I've
attached the relevant configuration below. Any help would be much
appreciated. Thanks.

- Justin

Tomcat
======
/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon
    cde/
        sitemap.xmap
    cli.xconf
    sitemap.xmap -> offloads logic to cde/sitemap.xmap
    WEB-INF/

CLI script
==========
/usr/local/cocoon/cocoon-2.1.1
    cocoon.sh


cli.xconf
=========
<cocoon verbose="true"
    follow-links="false"
    precompile-only="false"
    confirm-extensions="false">

    
<context-dir>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon</context-dir>
<config-file>/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.
xconf</config-file>
    <work-dir>build/work</work-dir>
    
    <accept>*/*</accept>
    
    <include pattern="**"/>
    <exclude pattern="docs/apidocs/**"/>
    <uri
        type="replace"
        src-prefix=""
        src="toc"
        
dest="/usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml/toc.xml"/>
</cocoon>

command line
============
./cocoon.sh cli -x /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf

Excpetions
==========
Exception in thread "main" java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.NoClassDefFoundError:
javax/servlet/http/HttpServletRequest


On 10/18/03 11:43 PM, "Upayavira" <uv...@upaya.co.uk> wrote:

> Justin,
> 
>> I've read the documentation and the Wiki as well the most recent CLI threads
>> in July and earlier this month. However, I can't seem to figure out how to
>> configure the cli.xconf for my webapp.
>> 
>> The site I'm building is dynamic, using Cocoon 2.1.1 to transform aggregated
>> XML docs at run-time. Part of this aggregation is a static table of contents
>> (TOC) document that is generated at design-time with a transform on Cocoon's
>> directory generator output.
>> 
>> <map:match pattern="toc">
>>    <map:generate src="xml/site" type="directory">
>>        <map:parameter name="depth" value="10"/>
>>    </map:generate>
>>    <map:transform src="xsl/gentoc.xsl"/>
>>    <map:serialize type="xml"/>
>> </map:match>
>> 
>> I request http://server:8080/toc to generate the XML in my browser. By hand,
>> I paste the resulting XML into a file called toc.xml. This is a mind
>> numbingly arduous process that I hoped to automate in the deployment process
>> with Ant. However, the first step is generating toc.xml with Cocoon's
>> command line interface. Because I need to use the directory generator, I
>> don't see a way around this.
>>  
>> 
> Shouldn't be a problem.
> 
>> To install Cocoon 2.1.1, I built a minimalist WAR that I deployed in Tomcat.
>> This, of course, doesn¹t include all of the goodies in the build directory
>> of the installation directory. Where do I put my custom cli.xconf file?
>> 
> Anywhere. But it must be referred to via an absolute path, or relative
> to the cocoon.sh file.
> 
>> In
>> my cocoon-2.1.2/build directory or in my tomcat/webapps/cocoon directory?
>> Also, given my path confusion, I'm not sure how to set the <context-dir>,
>> 
> The root of your webapp - the folder containing your sitemap.xmap and
> your WEB-INF folder.
> 
>> <config-file>, 
>> 
> Path, from your config directory (or absolute) to your cocoon.xconf
> (optional)
> 
>> <work-dir>, 
>> 
> A working directory, can be anywhere.
> 
>> and <dest-dir> elements.
>> 
> The folder where you want your files written (if not specified in a
> <uri> node @dest attribute. Therefore not relevent in your case.
> 
>> Finally, is this the
>> correct <uri> for generating the URL http://server:8080/toc into the file
>> site/xml/toc.xml within tomcat/webapps/cocoon?
>> 
>> <uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>>  
>> 
> Yup. That looks fine.
> 
>> Here are the interesting parts of my cli.xconf (currently located in
>> tomcat/webapps/cocoon/):
>> 
>> <context-dir>
>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde
>> </context-dir>
>> <config-file>
>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.xconf
>> </config-file>
>> <work-dir>build/work</work-dir>
>> <dest-dir>
>> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml
>> </dest-dir>
>> 
>> ...
>>  
>> 
> Your config file path is missing 'cde' I think.
> 
>> <uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>> 
>> Run from the commandline using
>> 
>> ./cocoon.sh cli -x /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf
>>  
>> 
> The cocoon.sh script is configured to work off a built Cocoon with the
> webapp in build/webapp. You can try setting COCOON_HOME environment
> variable to the path to your webapp (same as context-dir) before running it.
> 
>> I'm getting the error
>> 
>> Cannot find CatalogManager.properties
>> 
> You can ignore that one. Now fixed in latest Cocoon in CVS.
> 
>> Exception in thread "main" java.lang.reflect.InvocationTargetException
>> ...
>> Caused by: java.lang.NoClassDefFoundError:
>> javax/servlet/http/HttpServletRequest
>>  
>> 
> You need to have servlet2_X.jar in your classpath, which is defined in
> cocoon.sh.
> 
>> I'm very confused. Any help would be much appreciated.
>>  
>> 
> Does that help?
> 
> Regards, Upayavira
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Command line interface

Posted by Upayavira <uv...@upaya.co.uk>.
Justin,

>I've read the documentation and the Wiki as well the most recent CLI threads
>in July and earlier this month. However, I can't seem to figure out how to
>configure the cli.xconf for my webapp.
>
>The site I'm building is dynamic, using Cocoon 2.1.1 to transform aggregated
>XML docs at run-time. Part of this aggregation is a static table of contents
>(TOC) document that is generated at design-time with a transform on Cocoon's
>directory generator output.
>
><map:match pattern="toc">
>    <map:generate src="xml/site" type="directory">
>        <map:parameter name="depth" value="10"/>
>    </map:generate>
>    <map:transform src="xsl/gentoc.xsl"/>
>    <map:serialize type="xml"/>
></map:match>
>
>I request http://server:8080/toc to generate the XML in my browser. By hand,
>I paste the resulting XML into a file called toc.xml. This is a mind
>numbingly arduous process that I hoped to automate in the deployment process
>with Ant. However, the first step is generating toc.xml with Cocoon's
>command line interface. Because I need to use the directory generator, I
>don't see a way around this.
>  
>
Shouldn't be a problem.

>To install Cocoon 2.1.1, I built a minimalist WAR that I deployed in Tomcat.
>This, of course, doesn¹t include all of the goodies in the build directory
>of the installation directory. Where do I put my custom cli.xconf file? 
>
Anywhere. But it must be referred to via an absolute path, or relative 
to the cocoon.sh file.

>In
>my cocoon-2.1.2/build directory or in my tomcat/webapps/cocoon directory?
>Also, given my path confusion, I'm not sure how to set the <context-dir>,
>
The root of your webapp - the folder containing your sitemap.xmap and 
your WEB-INF folder.

><config-file>, 
>
Path, from your config directory (or absolute) to your cocoon.xconf 
(optional)

><work-dir>, 
>
A working directory, can be anywhere.

>and <dest-dir> elements. 
>
The folder where you want your files written (if not specified in a 
<uri> node @dest attribute. Therefore not relevent in your case.

>Finally, is this the
>correct <uri> for generating the URL http://server:8080/toc into the file
>site/xml/toc.xml within tomcat/webapps/cocoon?
>
><uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>  
>
Yup. That looks fine.

>Here are the interesting parts of my cli.xconf (currently located in
>tomcat/webapps/cocoon/):
>
><context-dir>
> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde
></context-dir>
><config-file>
> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/WEB-INF/cocoon.xconf
></config-file>
><work-dir>build/work</work-dir>
><dest-dir>
> /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cde/xml
></dest-dir>
>
>...
>  
>
Your config file path is missing 'cde' I think.

><uri type="replace" src-prefix="" src="toc" dest="site/xml/toc.xml"/>
>
>Run from the commandline using
>
>./cocoon.sh cli -x /usr/local/jakarta-tomcat-4.1.27/webapps/cocoon/cli.xconf
>  
>
The cocoon.sh script is configured to work off a built Cocoon with the 
webapp in build/webapp. You can try setting COCOON_HOME environment 
variable to the path to your webapp (same as context-dir) before running it.

>I'm getting the error
>
>Cannot find CatalogManager.properties
>
You can ignore that one. Now fixed in latest Cocoon in CVS.

>Exception in thread "main" java.lang.reflect.InvocationTargetException
>...
>Caused by: java.lang.NoClassDefFoundError:
>javax/servlet/http/HttpServletRequest
>  
>
You need to have servlet2_X.jar in your classpath, which is defined in 
cocoon.sh.

>I'm very confused. Any help would be much appreciated.
>  
>
Does that help?

Regards, Upayavira



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Command line interface

Posted by Mark Lundquist <ml...@comcast.net>.
Sorry, I had misread your post.  I realize now that that part I 
responded to was just the set-up; the rest of your post describes your 
attempt to get the "real way" to work, yes?

~ml


On Sunday, October 19, 2003, at 05:15 AM, Mark Lundquist wrote:

>
> On Saturday, October 18, 2003, at 05:01 PM, Justin Makeig wrote:
>
>> I've read the documentation and the Wiki as well the most recent CLI 
>> threads
>> in July and earlier this month. However, I can't seem to figure out 
>> how to
>> configure the cli.xconf for my webapp.
>>
>> The site I'm building is dynamic, using Cocoon 2.1.1 to transform 
>> aggregated
>> XML docs at run-time. Part of this aggregation is a static table of 
>> contents
>> (TOC) document that is generated at design-time with a transform on 
>> Cocoon's
>> directory generator output.
>>
>> <map:match pattern="toc">
>>     <map:generate src="xml/site" type="directory">
>>         <map:parameter name="depth" value="10"/>
>>     </map:generate>
>>     <map:transform src="xsl/gentoc.xsl"/>
>>     <map:serialize type="xml"/>
>> </map:match>
>>
>> I request http://server:8080/toc to generate the XML in my browser. 
>> By hand,
>> I paste the resulting XML into a file called toc.xml. This is a mind
>> numbingly arduous process that I hoped to automate in the deployment 
>> process
>> with Ant. However, the first step is generating toc.xml with Cocoon's
>> command line interface. Because I need to use the directory 
>> generator, I
>> don't see a way around this.
>
> I don't know very much about Cocoon yet, so I wouldn't be surprised if 
> there's a more direct way than this, but...
>
> Couldn't you just use curl, instead of copy/paste out of a browser?
>
> It still seems hacky, but at least you could automate that.
>
> ~ml
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Command line interface

Posted by Justin Makeig <li...@makeig.com>.
I thought about curl (or wget), but I didn't want to require that the server
be running to deploy. Is this unreasonable?

- Justin

On 10/19/03 5:15 AM, "Mark Lundquist" <ml...@comcast.net> wrote:

> 
> On Saturday, October 18, 2003, at 05:01 PM, Justin Makeig wrote:
> 
>> I've read the documentation and the Wiki as well the most recent CLI
>> threads
>> in July and earlier this month. However, I can't seem to figure out
>> how to
>> configure the cli.xconf for my webapp.
>> 
>> The site I'm building is dynamic, using Cocoon 2.1.1 to transform
>> aggregated
>> XML docs at run-time. Part of this aggregation is a static table of
>> contents
>> (TOC) document that is generated at design-time with a transform on
>> Cocoon's
>> directory generator output.
>> 
>> <map:match pattern="toc">
>>     <map:generate src="xml/site" type="directory">
>>         <map:parameter name="depth" value="10"/>
>>     </map:generate>
>>     <map:transform src="xsl/gentoc.xsl"/>
>>     <map:serialize type="xml"/>
>> </map:match>
>> 
>> I request http://server:8080/toc to generate the XML in my browser. By
>> hand,
>> I paste the resulting XML into a file called toc.xml. This is a mind
>> numbingly arduous process that I hoped to automate in the deployment
>> process
>> with Ant. However, the first step is generating toc.xml with Cocoon's
>> command line interface. Because I need to use the directory generator,
>> I
>> don't see a way around this.
> 
> I don't know very much about Cocoon yet, so I wouldn't be surprised if
> there's a more direct way than this, but...
> 
> Couldn't you just use curl, instead of copy/paste out of a browser?
> 
> It still seems hacky, but at least you could automate that.
> 
> ~ml
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Command line interface

Posted by Mark Lundquist <ml...@comcast.net>.
On Saturday, October 18, 2003, at 05:01 PM, Justin Makeig wrote:

> I've read the documentation and the Wiki as well the most recent CLI 
> threads
> in July and earlier this month. However, I can't seem to figure out 
> how to
> configure the cli.xconf for my webapp.
>
> The site I'm building is dynamic, using Cocoon 2.1.1 to transform 
> aggregated
> XML docs at run-time. Part of this aggregation is a static table of 
> contents
> (TOC) document that is generated at design-time with a transform on 
> Cocoon's
> directory generator output.
>
> <map:match pattern="toc">
>     <map:generate src="xml/site" type="directory">
>         <map:parameter name="depth" value="10"/>
>     </map:generate>
>     <map:transform src="xsl/gentoc.xsl"/>
>     <map:serialize type="xml"/>
> </map:match>
>
> I request http://server:8080/toc to generate the XML in my browser. By 
> hand,
> I paste the resulting XML into a file called toc.xml. This is a mind
> numbingly arduous process that I hoped to automate in the deployment 
> process
> with Ant. However, the first step is generating toc.xml with Cocoon's
> command line interface. Because I need to use the directory generator, 
> I
> don't see a way around this.

I don't know very much about Cocoon yet, so I wouldn't be surprised if 
there's a more direct way than this, but...

Couldn't you just use curl, instead of copy/paste out of a browser?

It still seems hacky, but at least you could automate that.

~ml


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org