cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Action XSP
Date Thu, 16 May 2002 16:20:53 GMT
Konstantin Piroumian wrote:

>From: "Artur Bialecki" <>
>>Actions are great, however it would be nice If
>>I could dynamically create them with XSP so in
>>my sitemap I have:
>>  name="my-action"
>>  src="/actions/my-action.xsp"
>>  logger=""
>>Where my-action.xsp gets trasfomed to java using
>>some action.xsl, builtin and custom logicsheets.
>>Cocoon already has everything I need other than the
>Are you looking for this:
>ction.xsl ?

And org.apache.cocoon.acting.ServerPagesAction (Vadim was faster ;)

>>How would I go about adding this functionality?
>>Where do I start?
>May I ask a question? Why do you need an XSP based action? IMHO, actions
>should be pure Java classes that perform some programmatic logic and you
>have Generators for XML generation, based on the result from actions.
>Are there any real use-cases?

I think the need expressed by Arthur is the hot-recompilation nature of 
XSPs, which it really great at development time, along with the 
high-level constructs offered by taglibs.

But there are cases where an XSP can be more than a generator : consider 
the ESQL logicsheet, which provides powerful tags for querying 
databases. But what if you would like to choose a particular page 
depending on the query results ? If the XSP is the pipeline generator, 
redirect (even internal) is not possible. If the XSP is an action, 
redirect is possible.

That's what the ServerPagesAction is for. It is to be used in 
conjonction with the action taglib (providing redirect and action result 
primitives) and the capture taglib (for capturing parts of the 
XSP-produced XML for later use).

In a sense, the XSP action belongs to the same domain than pipe-aware 
selectors that were discussed a while ago.


Sylvain Wallez
  Anyware Technologies                  Apache Cocoon 

To unsubscribe, e-mail:
For additional commands, email:

View raw message