You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by jantje <ja...@skynet.be> on 2008/08/19 13:37:16 UTC

Not able to create and test cocoon2.2 webapp with maven/jetty

Hi there, I am not able to create a working cocoon webapp and test it with
maven/jetty.

Does someone know what is wrong with the next steps? Thanks for your reply!
cd project/build/blocks;
mvn archetype:create -DarchetypeGroupId=org.apache.cocoon
-DarchetypeArtifactId=cocoon-22-archetype-block -DarchetypeVersion=1.0.0
-DgroupId=project.be -DartifactId=ajaxBlock;
In pom:
  <name>ajaxBlock</name>
  <groupId>project</groupId>
  <artifactId>ajaxBlock</artifactId>
  <version>1.0</version>

cd project/build/blocks/ajaxBlock;
mvn jetty:run; ### testing!
mvn package;
mvn install:install-file -DgroupId=project.be -DartifactId=ajaxBlock
-Dversion=1.0 -Dpackaging=jar -Dfile=target/ajaxBlock-1.0.jar;

cd project/build/blocks ###create cocoon webapp
mvn archetype:create -DarchetypeGroupId=org.apache.cocoon
-DarchetypeArtifactId=cocoon-22-archetype-webapp -DarchetypeVersion=1.0.0
-DgroupId=project.be -DartifactId=cocoon-webapp;
in pom:
  <name>cocoon-webapp</name>
  <groupId>project</groupId>
  <artifactId>cocoon-webapp</artifactId>
  <version>1.0</version>

cd project/build/blocks/cocoon-webapp
mvn:package ### untill here everything works
mvn jetty:run; ### this gives errors..

Is there soms step I am missing?

Thanks..
-- 
View this message in context: http://www.nabble.com/Not-able-to-create-and-test-cocoon2.2-webapp-with-maven-jetty-tp19048077p19048077.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


Re: Not able to create and test cocoon2.2 webapp with maven/jetty

Posted by Ken Starks <ke...@lampsacos.demon.co.uk>.
sorry, I forgot: perhaps it would be better to start a new thread about 
this.
We are straying off topic a bit far!

Ken Starks wrote:

> Derek Hohls wrote:
>> Ken
>>
>> I am very curious how you plan to get PDF output using
>> LaTeX and Cocoon - I have seen Hugh's page where he
>> generates GIF images from LaTeX equations
>> ( http://www.csparks.com/jeuler/index.jhtml )
>> but this seems an order-of-magnitude more complex.
>>
>> Derek
>>
>>   
>>>>> On 2008/08/21 at 09:37, in message <48...@lampsacos.demon.co.uk>, Ken Starks <ke...@lampsacos.demon.co.uk> wrote:
>>>>>         
>> Luca Morandini wrote:
>>   
>>> jantje wrote:
>>>     
>>>> So on the internet I am searching ways to generate
>>>> cocoon webapp from my blocks. There I have found the install 
>>>> instruction and
>>>> the advice to use it.. So do you think there is a better way to 
>>>> generate a
>>>> webapp. And do you advice me not to install my seperate blocks?
>>>>       
>>> I'm not sure to get what you mean... but the idea is to create a 
>>> Cocoon webapp by using the cocoon-archetype-webapp and then declare 
>>> the needed blocks in its pom.xml, not to generate webapps from blocks.
>>>
>>> You may look at an example of said steps in:
>>> http://www.lucamorandini.it/fins/installation.html 
>>>
>>> Regards,
>>>
>>> --------------------
>>>    Luca Morandini
>>>     
>>
>>   
>> Hello Luca,
>>
>> My main interest is in making a wider variety of diagram than
>> those used in 'business graphics'. This is because there is quite a number
>> of utilities already in that corner of the market. But your
>> project is still of interest to me.
>>
>> I was wondering whether you have an xml-schema, or a good bunch of
>> samples of the source XML files you use in Fins.
>>
>> My interest would be to go to a PDF  edition of the charts without passing
>> through SVG, and using LaTeX and friends rather than FOP.
>>
>>
>>
>>
>>
>>   
> TeXML. Its quite a thin wrapper round LaTeX.
>
> First you write a specimen LaTeX file of the kind you wish to have.
> Secondly you  rewrite it so the absolute maximum functionality is in 
> the header as
> \newcommand{....}[]{....},
> and the main body consists mainly of calls to these commands.
>  
> You are then ready to write your  XSL-T file, (xml2texml.xsl) which is 
> what you put
> into cocoon.  It is easier, and also a better 'separation of concerns' 
> to make this file
> import your preamble than to generate it in situ.
>
> Let us say your source is Foo.xml;  you create a match for *.texml in 
> the usual way.
> As we are in cocoon at this stage, you can of course use any 
> generator. It doesn't
> have to be an xml file.
>
> You don't need to worry about the serializer really. The texml output 
> that you need
> from Cocoon is an xml format.
>
> A python script then downloads Foo.texml, turns it into Foo.tex. This 
> is a task that is to complex,
> as far as I know, for XSLT, but if someone wants to rewrite it in 
> java  and stick it in a
> cocoon block, I certainly won't stop them!
>
> When you run this tex file, it will import the preamble bit as usual, 
> so long as it is  in
> the right place, client-side.
>
> Now I would be the first to admit that TeXML is not easy to work 
> with.  You need
> all the usual lateX skills, plus tolleration for some pretty peculiar 
> syntax.
>
> But you  _do_  get a fully automatic path from xml to pdf  in the end, 
> and unlike
> most other systems you have the possibility of generating PDF-forms, 
> injecting
> javascript and so on, assuming you can already do that in LaTeX.
>
>


Re: Not able to create and test cocoon2.2 webapp with maven/jetty

Posted by Ken Starks <ke...@lampsacos.demon.co.uk>.
Derek Hohls wrote:
> Ken
>
> I am very curious how you plan to get PDF output using
> LaTeX and Cocoon - I have seen Hugh's page where he
> generates GIF images from LaTeX equations
> ( http://www.csparks.com/jeuler/index.jhtml )
> but this seems an order-of-magnitude more complex.
>
> Derek
>
>   
>>>> On 2008/08/21 at 09:37, in message <48...@lampsacos.demon.co.uk>, Ken Starks <ke...@lampsacos.demon.co.uk> wrote:
>>>>         
> Luca Morandini wrote:
>   
>> jantje wrote:
>>     
>>> So on the internet I am searching ways to generate
>>> cocoon webapp from my blocks. There I have found the install 
>>> instruction and
>>> the advice to use it.. So do you think there is a better way to 
>>> generate a
>>> webapp. And do you advice me not to install my seperate blocks?
>>>       
>> I'm not sure to get what you mean... but the idea is to create a 
>> Cocoon webapp by using the cocoon-archetype-webapp and then declare 
>> the needed blocks in its pom.xml, not to generate webapps from blocks.
>>
>> You may look at an example of said steps in:
>> http://www.lucamorandini.it/fins/installation.html 
>>
>> Regards,
>>
>> --------------------
>>    Luca Morandini
>>     
>
>   
> Hello Luca,
>
> My main interest is in making a wider variety of diagram than
> those used in 'business graphics'. This is because there is quite a number
> of utilities already in that corner of the market. But your
> project is still of interest to me.
>
> I was wondering whether you have an xml-schema, or a good bunch of
> samples of the source XML files you use in Fins.
>
> My interest would be to go to a PDF  edition of the charts without passing
> through SVG, and using LaTeX and friends rather than FOP.
>
>
>
>
>
>   
TeXML. Its quite a thin wrapper round LaTeX.

First you write a specimen LaTeX file of the kind you wish to have.
Secondly you  rewrite it so the absolute maximum functionality is in the 
header as
\newcommand{....}[]{....},
and the main body consists mainly of calls to these commands.
 
You are then ready to write your  XSL-T file, (xml2texml.xsl) which is 
what you put
into cocoon.  It is easier, and also a better 'separation of concerns' 
to make this file
import your preamble than to generate it in situ.

Let us say your source is Foo.xml;  you create a match for *.texml in 
the usual way.
As we are in cocoon at this stage, you can of course use any generator. 
It doesn't
have to be an xml file.

You don't need to worry about the serializer really. The texml output 
that you need
from Cocoon is an xml format.

A python script then downloads Foo.texml, turns it into Foo.tex. This is 
a task that is to complex,
as far as I know, for XSLT, but if someone wants to rewrite it in java  
and stick it in a
cocoon block, I certainly won't stop them!

When you run this tex file, it will import the preamble bit as usual, so 
long as it is  in
the right place, client-side.

Now I would be the first to admit that TeXML is not easy to work with.  
You need
all the usual lateX skills, plus tolleration for some pretty peculiar 
syntax.

But you  _do_  get a fully automatic path from xml to pdf  in the end, 
and unlike
most other systems you have the possibility of generating PDF-forms, 
injecting
javascript and so on, assuming you can already do that in LaTeX.



Re: Not able to create and test cocoon2.2 webapp with maven/jetty

Posted by Derek Hohls <DH...@csir.co.za>.
Ken

I am very curious how you plan to get PDF output using
LaTeX and Cocoon - I have seen Hugh's page where he
generates GIF images from LaTeX equations
( http://www.csparks.com/jeuler/index.jhtml )
but this seems an order-of-magnitude more complex.

Derek

>>> On 2008/08/21 at 09:37, in message <48...@lampsacos.demon.co.uk>, Ken Starks <ke...@lampsacos.demon.co.uk> wrote:
Luca Morandini wrote:
> jantje wrote:
>>
>> So on the internet I am searching ways to generate
>> cocoon webapp from my blocks. There I have found the install 
>> instruction and
>> the advice to use it.. So do you think there is a better way to 
>> generate a
>> webapp. And do you advice me not to install my seperate blocks?
>
> I'm not sure to get what you mean... but the idea is to create a 
> Cocoon webapp by using the cocoon-archetype-webapp and then declare 
> the needed blocks in its pom.xml, not to generate webapps from blocks.
>
> You may look at an example of said steps in:
> http://www.lucamorandini.it/fins/installation.html 
>
> Regards,
>
> --------------------
>    Luca Morandini

>
Hello Luca,

My main interest is in making a wider variety of diagram than
those used in 'business graphics'. This is because there is quite a number
of utilities already in that corner of the market. But your
project is still of interest to me.

I was wondering whether you have an xml-schema, or a good bunch of
samples of the source XML files you use in Fins.

My interest would be to go to a PDF  edition of the charts without passing
through SVG, and using LaTeX and friends rather than FOP.





-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: Not able to create and test cocoon2.2 webapp with maven/jetty

Posted by Ken Starks <ke...@lampsacos.demon.co.uk>.
Luca Morandini wrote:
> jantje wrote:
>>
>> So on the internet I am searching ways to generate
>> cocoon webapp from my blocks. There I have found the install 
>> instruction and
>> the advice to use it.. So do you think there is a better way to 
>> generate a
>> webapp. And do you advice me not to install my seperate blocks?
>
> I'm not sure to get what you mean... but the idea is to create a 
> Cocoon webapp by using the cocoon-archetype-webapp and then declare 
> the needed blocks in its pom.xml, not to generate webapps from blocks.
>
> You may look at an example of said steps in:
> http://www.lucamorandini.it/fins/installation.html
>
> Regards,
>
> --------------------
>    Luca Morandini
> www.lucamorandini.it
> --------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
Hello Luca,

My main interest is in making a wider variety of diagram than
those used in 'buisiness graphics'. This is because there is quite a number
of utilities already in that corner of the market. But your
project is still of interest to me.

 I was wondering whether you have an xml-schema, or a good bunch of
samples of the source XML files you use in Fins.

My interest would be to go to a PDF  edition of the charts without passing
through SVG, and using LaTeX and friends rather than FOP.




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


RE: External Entity in sitemap

Posted by Heather Rankin <He...@bbc.co.uk>.
> you could say a little bit more about WHAT you are trying to achieve
rather than just 
> the HOW you are trying to do it

Sure. All I'm trying to do is call the same pipeline from multiple
blocks and pass it some unique parameters. All the pipeline needs to do
is receive the parameters, call a transformation and set the Allow
response header. Everything works except setting the Allow response
header. 

I was doing some digging and found this:
https://issues.apache.org/jira/browse/COCOON-1619 Am I right in taking
from this that you can't pass header info up from sub pipelines?

Heather

________________________________

From: warrell harries [mailto:warrell.harries@googlemail.com] 
Sent: 20 August 2008 16:08
To: users@cocoon.apache.org
Subject: Re: External Entity in sitemap


Do you need to use the Servlet Service? I'm not fully up to speed on 2.2
yet so I imagine you are using this as a datasource and you just want to
add an extra HTTP header. Can you use one of the Proxy generators
instead? I have some code for a SOAP Proxy Transformer or a Simple HTTP
Proxy Transformer that might fit the bill... I know it steps outside of
the XML pluggable ideal but it might be what you need if you could say a
little bit more about WHAT you are trying to achieve rather than just
the HOW you are trying to do it:)

All the George (best),

Warrell


2008/8/20 Heather Rankin <He...@bbc.co.uk>


	Thanks Warrell and Luca,
	
	Just for some background, going the xml entity route wasn't my
initial
	preference. I've tried multiple approaches including map:mount
and
	servlet service - all to no avail.
	
	Map:mount doesn't let me send parameters to the mounted sitemap
(aside
	from global ones which aren't an option here) and Servlet
Service
	doesn't allow me to carry out Actions for some reason. Servlet
Service
	still feels like the most sensible option here but I need the
action
	carried out - maybe someone could help with this.
	
	In my block1 sitemap I have this:
	
	<map:generate type="request"/>
	<map:transform type="servletService">
	<map:parameter name="service"
	value="servlet:CentralConfigurationBlock:/method-NA/GET"/>
	</map:transform>
	<map:serialize />
	
	In my CentralConfigurationBlock sitemap I have this:
	
	<map:pipeline>
	<map:match pattern="method-NA/*">
	<map:generate type="file" src="content/methodNotAllowed.xhtml"/>
	<map:transform type="xslt2" src="transforms/addMethods.xsl">
	<map:parameter name="METHODS" value="{1}"/>
	</map:transform>
	<map:act type="addHttpHeader">
	<map:parameter name="Allow" value="{1}"/>
	</map:act>
	<map:serialize type="application/xhtml+xml" status-code="405"
	label="Method Not Allowed"/>
	</map:match>
	</map:pipeline>
	
	Everything works fine except for the addHttpHeader action which
is
	defined as:
	
	<map:action name="addHttpHeader"
	src="org.apache.cocoon.acting.HttpHeaderAction"/>
	
	It doesn't do anything. If I call the centralConfigurationBlock
pipeline
	directly - ie not through servlet service - the action does what
its
	supposed to and sets the Allow header with the appropriate
value.
	
	Does anyone have any idea why this wouldn't work with servlet
service?
	The xml entity route was just meant to be a temporary workaround
- but
	even that's not working so I'd like to go with a more solid
approach if
	possible.
	
	Heather
	
	
	________________________________
	
	From: warrell harries [mailto:warrell.harries@googlemail.com]
	Sent: 20 August 2008 14:09
	To: users@cocoon.apache.org; lmorandini@ieee.org
	Subject: Re: External Entity in sitemap
	


	Hi Heather,
	
	You should certainly follow the tutorial on how to use catalogs
to make
	the XML Entity known to Cocoon. This worked for me with some
large DTDs
	that I needed to make available to Cocoon 2.1x.
	
	On the related question of how to get an XML fragment into your
sitemap
	you could invoke a matcher in another block with
cocoon://block/matcher
	but this would need to be used as the src for a generator or as
part of
	an aggregation at the generator stage and the matcher would have
to
	serialize xml at the end of its pipeline.
	
	Hope this helps,
	
	Warrell
	
	
	2008/8/20 Luca Morandini <lm...@ieee.org>
	
	
	       Heather Rankin wrote:
	
	
	
	               I'm using 2.2 and want to include an xml fragment
in my
	sitemap using
	               entities. The xml fragment I want to include sits
inside
	another block.
	               Can I use something like blockcontext:/ to access
it?
	
	
	
	       I would be rather surprised if this was the case.
	       AFAIK, external entities are dealt with by the XML parser
	(Xerces) before the Cocoon sitemap engine kicks in.
	
	       Regards,
	
	       --------------------
	         Luca Morandini
	       www.lucamorandini.it
	       --------------------
	
	
	
	
	
---------------------------------------------------------------------
	       To unsubscribe, e-mail:
users-unsubscribe@cocoon.apache.org
	       For additional commands, e-mail:
users-help@cocoon.apache.org
	
	
	
	
	
	
	http://www.bbc.co.uk/
	This e-mail (and any attachments) is confidential and may
contain personal views which are not the views of the BBC unless
specifically stated.
	If you have received it in error, please delete it from your
system.
	Do not use, copy or disclose the information in any way nor act
in reliance on it and notify the sender immediately.
	Please note that the BBC monitors e-mails sent or received.
	Further communication will signify your consent to this.
	
	
	
---------------------------------------------------------------------
	
	To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
	For additional commands, e-mail: users-help@cocoon.apache.org
	
	



http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

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


Re: External Entity in sitemap

Posted by warrell harries <wa...@googlemail.com>.
Do you need to use the Servlet Service? I'm not fully up to speed on 2.2 yet
so I imagine you are using this as a datasource and you just want to add an
extra HTTP header. Can you use one of the Proxy generators instead? I have
some code for a SOAP Proxy Transformer or a Simple HTTP Proxy Transformer
that might fit the bill... I know it steps outside of the XML pluggable
ideal but it might be what you need if you could say a little bit more about
WHAT you are trying to achieve rather than just the HOW you are trying to do
it:)

All the George (best),

Warrell

2008/8/20 Heather Rankin <He...@bbc.co.uk>

> Thanks Warrell and Luca,
>
> Just for some background, going the xml entity route wasn't my initial
> preference. I've tried multiple approaches including map:mount and
> servlet service - all to no avail.
>
> Map:mount doesn't let me send parameters to the mounted sitemap (aside
> from global ones which aren't an option here) and Servlet Service
> doesn't allow me to carry out Actions for some reason. Servlet Service
> still feels like the most sensible option here but I need the action
> carried out - maybe someone could help with this.
>
> In my block1 sitemap I have this:
>
> <map:generate type="request"/>
> <map:transform type="servletService">
> <map:parameter name="service"
> value="servlet:CentralConfigurationBlock:/method-NA/GET"/>
> </map:transform>
> <map:serialize />
>
> In my CentralConfigurationBlock sitemap I have this:
>
> <map:pipeline>
> <map:match pattern="method-NA/*">
> <map:generate type="file" src="content/methodNotAllowed.xhtml"/>
> <map:transform type="xslt2" src="transforms/addMethods.xsl">
> <map:parameter name="METHODS" value="{1}"/>
> </map:transform>
> <map:act type="addHttpHeader">
> <map:parameter name="Allow" value="{1}"/>
> </map:act>
> <map:serialize type="application/xhtml+xml" status-code="405"
> label="Method Not Allowed"/>
> </map:match>
> </map:pipeline>
>
> Everything works fine except for the addHttpHeader action which is
> defined as:
>
> <map:action name="addHttpHeader"
> src="org.apache.cocoon.acting.HttpHeaderAction"/>
>
> It doesn't do anything. If I call the centralConfigurationBlock pipeline
> directly - ie not through servlet service - the action does what its
> supposed to and sets the Allow header with the appropriate value.
>
> Does anyone have any idea why this wouldn't work with servlet service?
> The xml entity route was just meant to be a temporary workaround - but
> even that's not working so I'd like to go with a more solid approach if
> possible.
>
> Heather
>
>
> ________________________________
>
> From: warrell harries [mailto:warrell.harries@googlemail.com]
> Sent: 20 August 2008 14:09
> To: users@cocoon.apache.org; lmorandini@ieee.org
> Subject: Re: External Entity in sitemap
>
>
> Hi Heather,
>
> You should certainly follow the tutorial on how to use catalogs to make
> the XML Entity known to Cocoon. This worked for me with some large DTDs
> that I needed to make available to Cocoon 2.1x.
>
> On the related question of how to get an XML fragment into your sitemap
> you could invoke a matcher in another block with cocoon://block/matcher
> but this would need to be used as the src for a generator or as part of
> an aggregation at the generator stage and the matcher would have to
> serialize xml at the end of its pipeline.
>
> Hope this helps,
>
> Warrell
>
>
> 2008/8/20 Luca Morandini <lm...@ieee.org>
>
>
>        Heather Rankin wrote:
>
>
>
>                I'm using 2.2 and want to include an xml fragment in my
> sitemap using
>                entities. The xml fragment I want to include sits inside
> another block.
>                Can I use something like blockcontext:/ to access it?
>
>
>
>        I would be rather surprised if this was the case.
>        AFAIK, external entities are dealt with by the XML parser
> (Xerces) before the Cocoon sitemap engine kicks in.
>
>        Regards,
>
>        --------------------
>          Luca Morandini
>        www.lucamorandini.it
>        --------------------
>
>
>
>
> ---------------------------------------------------------------------
>        To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>        For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
>
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain personal
> views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance
> on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

RE: External Entity in sitemap

Posted by Heather Rankin <He...@bbc.co.uk>.
Thanks Warrell and Luca,
 
Just for some background, going the xml entity route wasn't my initial
preference. I've tried multiple approaches including map:mount and
servlet service - all to no avail. 

Map:mount doesn't let me send parameters to the mounted sitemap (aside
from global ones which aren't an option here) and Servlet Service
doesn't allow me to carry out Actions for some reason. Servlet Service
still feels like the most sensible option here but I need the action
carried out - maybe someone could help with this.
 
In my block1 sitemap I have this:
 
<map:generate type="request"/> 
<map:transform type="servletService"> 
<map:parameter name="service"
value="servlet:CentralConfigurationBlock:/method-NA/GET"/>
</map:transform>
<map:serialize />

In my CentralConfigurationBlock sitemap I have this:

<map:pipeline>        
<map:match pattern="method-NA/*">
<map:generate type="file" src="content/methodNotAllowed.xhtml"/>
<map:transform type="xslt2" src="transforms/addMethods.xsl">
<map:parameter name="METHODS" value="{1}"/>
</map:transform>
<map:act type="addHttpHeader">
<map:parameter name="Allow" value="{1}"/>
</map:act>
<map:serialize type="application/xhtml+xml" status-code="405"
label="Method Not Allowed"/>
</map:match>   
</map:pipeline>

Everything works fine except for the addHttpHeader action which is
defined as: 

<map:action name="addHttpHeader"
src="org.apache.cocoon.acting.HttpHeaderAction"/>

It doesn't do anything. If I call the centralConfigurationBlock pipeline
directly - ie not through servlet service - the action does what its
supposed to and sets the Allow header with the appropriate value.

Does anyone have any idea why this wouldn't work with servlet service?
The xml entity route was just meant to be a temporary workaround - but
even that's not working so I'd like to go with a more solid approach if
possible.

Heather


________________________________

From: warrell harries [mailto:warrell.harries@googlemail.com] 
Sent: 20 August 2008 14:09
To: users@cocoon.apache.org; lmorandini@ieee.org
Subject: Re: External Entity in sitemap


Hi Heather,

You should certainly follow the tutorial on how to use catalogs to make
the XML Entity known to Cocoon. This worked for me with some large DTDs
that I needed to make available to Cocoon 2.1x.

On the related question of how to get an XML fragment into your sitemap
you could invoke a matcher in another block with cocoon://block/matcher
but this would need to be used as the src for a generator or as part of
an aggregation at the generator stage and the matcher would have to
serialize xml at the end of its pipeline.

Hope this helps,

Warrell


2008/8/20 Luca Morandini <lm...@ieee.org>


	Heather Rankin wrote:
	


		I'm using 2.2 and want to include an xml fragment in my
sitemap using
		entities. The xml fragment I want to include sits inside
another block.
		Can I use something like blockcontext:/ to access it? 
		


	I would be rather surprised if this was the case.
	AFAIK, external entities are dealt with by the XML parser
(Xerces) before the Cocoon sitemap engine kicks in.
	
	Regards,
	
	--------------------
	  Luca Morandini
	www.lucamorandini.it
	-------------------- 



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



http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

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


Re: External Entity in sitemap

Posted by warrell harries <wa...@googlemail.com>.
Hi Heather,

You should certainly follow the tutorial on how to use catalogs to make the
XML Entity known to Cocoon. This worked for me with some large DTDs that I
needed to make available to Cocoon 2.1x.

On the related question of how to get an XML fragment into your sitemap you
could invoke a matcher in another block with cocoon://block/matcher but this
would need to be used as the src for a generator or as part of an
aggregation at the generator stage and the matcher would have to serialize
xml at the end of its pipeline.

Hope this helps,

Warrell

2008/8/20 Luca Morandini <lm...@ieee.org>

> Heather Rankin wrote:
>
>>
>> I'm using 2.2 and want to include an xml fragment in my sitemap using
>> entities. The xml fragment I want to include sits inside another block.
>> Can I use something like blockcontext:/ to access it?
>>
>
> I would be rather surprised if this was the case.
> AFAIK, external entities are dealt with by the XML parser (Xerces) before
> the Cocoon sitemap engine kicks in.
>
> Regards,
>
> --------------------
>   Luca Morandini
> www.lucamorandini.it
> --------------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: External Entity in sitemap

Posted by Luca Morandini <lm...@ieee.org>.
Heather Rankin wrote:
> 
> I'm using 2.2 and want to include an xml fragment in my sitemap using
> entities. The xml fragment I want to include sits inside another block.
> Can I use something like blockcontext:/ to access it? 

I would be rather surprised if this was the case.
AFAIK, external entities are dealt with by the XML parser (Xerces) 
before the Cocoon sitemap engine kicks in.

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------


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


External Entity in sitemap

Posted by Heather Rankin <He...@bbc.co.uk>.
Hi,

I'm using 2.2 and want to include an xml fragment in my sitemap using
entities. The xml fragment I want to include sits inside another block.
Can I use something like blockcontext:/ to access it? E.g. something
like this:

<!DOCTYPE sitemap [
<!ENTITY resource
"{blockcontext:/CentralConfigurationBlock/shared_resources.xml}">
]>

<map:resources>
&resource;
</map:resources>

ATM, this doesn't work - it's happy that the entity is declared but it
doesn't actually find the xml file (the reason I know this is because
the xml file contains a <map:resource> and when I call that resource
from the main sitemap it says the resource cannot be found.) 

The only way I can get this to work is by hard coding an absolute path
to the xml file - which for obvious reasons is not ideal. Could catalogs
help here, possibly?

Thanks

Heather

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

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


Re: Not able to create and test cocoon2.2 webapp with maven/jetty

Posted by Luca Morandini <lm...@ieee.org>.
jantje wrote:
> 
> So on the internet I am searching ways to generate
> cocoon webapp from my blocks. There I have found the install instruction and
> the advice to use it.. So do you think there is a better way to generate a
> webapp. And do you advice me not to install my seperate blocks?

I'm not sure to get what you mean... but the idea is to create a Cocoon 
webapp by using the cocoon-archetype-webapp and then declare the needed 
blocks in its pom.xml, not to generate webapps from blocks.

You may look at an example of said steps in:
http://www.lucamorandini.it/fins/installation.html

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------


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


Re: Not able to create and test cocoon2.2 webapp with maven/jetty

Posted by jantje <ja...@skynet.be>.
Because I thought the cocoon webapp needs the blocks as a jar file? I am new
to cocoon2.2 And I am searching a way to make a cocoon webapp. So far, I
have success on creating and testing a block:

mvn archetype:create -DarchetypeGroupId=org.apache.cocoon
-DarchetypeArtifactId=cocoon-22-archetype-block -DarchetypeVersion=1.0.0
-DgroupId=project.be -DartifactId=myBlock;
cd myBlock
mvn jetty:run

This is rather poor. So on the internet I am searching ways to generate
cocoon webapp from my blocks. There I have found the install instruction and
the advice to use it.. So do you think there is a better way to generate a
webapp. And do you advice me not to install my seperate blocks?

THIS IS THE ERROR MESSAGE ON A STANDARD BLOCK, WITH A STANDARD COCOON
WEBAPP, LIKE IN THE COCOON TUTORIAL (after mvn jetty:run):

2008-08-19 16:06:12.332::WARN:  Could not instantiate listener
org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException:
org.springframework.web.context.ContextLoaderListener
-- 
View this message in context: http://www.nabble.com/Not-able-to-create-and-test-cocoon2.2-webapp-with-maven-jetty-tp19048077p19049487.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


Re: Not able to create and test cocoon2.2 webapp with maven/jetty

Posted by Grzegorz Kossakowski <gr...@tuffmail.com>.
jantje pisze:
> Hi there, I am not able to create a working cocoon webapp and test it with
> maven/jetty.
> 
> Does someone know what is wrong with the next steps? Thanks for your reply!
> cd project/build/blocks;
> mvn archetype:create -DarchetypeGroupId=org.apache.cocoon
> -DarchetypeArtifactId=cocoon-22-archetype-block -DarchetypeVersion=1.0.0
> -DgroupId=project.be -DartifactId=ajaxBlock;
> In pom:
>   <name>ajaxBlock</name>
>   <groupId>project</groupId>
>   <artifactId>ajaxBlock</artifactId>
>   <version>1.0</version>
> 
> cd project/build/blocks/ajaxBlock;
> mvn jetty:run; ### testing!
> mvn package;
> mvn install:install-file -DgroupId=project.be -DartifactId=ajaxBlock
> -Dversion=1.0 -Dpackaging=jar -Dfile=target/ajaxBlock-1.0.jar;

Why do you need to use install:install-file?

> cd project/build/blocks ###create cocoon webapp
> mvn archetype:create -DarchetypeGroupId=org.apache.cocoon
> -DarchetypeArtifactId=cocoon-22-archetype-webapp -DarchetypeVersion=1.0.0
> -DgroupId=project.be -DartifactId=cocoon-webapp;
> in pom:
>   <name>cocoon-webapp</name>
>   <groupId>project</groupId>
>   <artifactId>cocoon-webapp</artifactId>
>   <version>1.0</version>
> 
> cd project/build/blocks/cocoon-webapp
> mvn:package ### untill here everything works
> mvn jetty:run; ### this gives errors..

Without detailed error message nobody will be able to help I guess.

-- 
Grzegorz Kossakowski

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