Re: RCL goal refactorings / acegi

2008-04-09 Thread Reinhard Poetz

Patrick Heiden wrote:

Hello together!

Why is the acegi example still out-of-order? I've read [1] from Reinhard
Poetz (back in Jun 2007) and there he mentioned trouble with
ApplicationContext access due to the fact it seems to get closed when
integrating acegi. I am able to reproduce the exception with baby-fresh trunk
few minutes ago.

Are there solutions / hints for this one?


I had a brief look into this issue and wasn't able to solve it at that time. 
Maybe somebody else with more time can have a look.


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: 2.2 trunk - Servlet Service set attribute in global session but lose it at next servlet call.

2008-04-09 Thread Reinhard Poetz

Josh2007 wrote:

Hello,

I have a main block (block-a) which makes calls to a depend block (block-b).

Block-b has access to the global session.

At the first call from block-a, block-b creates a session-attribute test. 
I noticed this session-attribute can be retrieved within block-b (right

after setting it), but not within block-a.

At the second call from block-a, block-b needs to read the session-attribute
test it has created at the first call, but cannot find it anymore:
session-attr test doesn't exists.

My question:
Does it mean, you can set up a session-attribute in a dependent block only
available for the time of the request? Which means if I make another request
the session-attribute will not be available anymore?

Is there a way to set a session-attribute in a dependent block and make it
available for the duration of the global session?

Thanks,

Josh

My Cocoon blocks version:
cocoon-core: 2.2.1-SNAPSHOT
cocoon-servlet-service-components: 1.1.0-SNAPSHOT
cocoon-template-impl: 1.2.0-SNAPSHOT
cocoon-flowscript-impl: 1.1.0-SNAPSHOT


Sounds like a bug :-(
Can you file a report please?

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: RCL goal refactorings / acegi

2008-04-09 Thread Reinhard Poetz

Patrick Heiden wrote:

Could you give a hint on where to dig inside cocoons code to have a look for
myself meanwhile? Would be nice.


Sure. The Maven 2 plugin can be found at
http://svn.apache.org/repos/asf/cocoon/trunk/tools/cocoon-maven-plugin/. It
contains all the stuff that creates a small web application for a block so that
it becomes runnable in a servlet container.

The integration of the RCL is done by intercepting all requests (servlets,
servlet filters, listeners) and replacing the classloader with a reloading
classloader implementation. This code can be found at
http://svn.apache.org/repos/asf/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-webapp-wrapper/.

The third module is the spring reloader
(http://svn.apache.org/repos/asf/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-spring-reloader/)
that wraps a Spring context and performs the restarts of the Spring application
context whenever necessary.

Another hint that might help:
When a class or an interface, that is loaded by the RCL, is proxied or rewritten 
by Spring AOP, this leads to exceptions after the first reload. I guess this is 
a problem with the RCL implementation (Apache Commons JCI) but I haven't had 
time to write a test case that proves this statement.


Apart from problems with Spring Security and Spring AOP, the third known issue 
is session handling. If you put an object that is loaded by the reloading 
classloader into the session, you will run into a class cast exception after the 
first reload occured because the instance of the reloading classloader has changed.


If you want to route around these problems, create a module that contains all 
those classes that should not be loaded by the reloading classloader and add it 
as a dependency to your module.


HTH

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: RCL goal refactorings / acegi

2008-04-09 Thread Reinhard Poetz

Patrick Heiden wrote:

Hello!

Sure. The Maven 2 plugin can be found at 
http://svn.apache.org/repos/asf/cocoon/trunk/tools/cocoon-maven-plugin/. It

 contains all the stuff that creates a small web application for a block so
 that it becomes runnable in a servlet container.

The integration of the RCL is done by intercepting all requests (servlets, 
servlet filters, listeners) and replacing the classloader with a reloading 
classloader implementation. This code can be found at 
http://svn.apache.org/repos/asf/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-webapp-wrapper/.



The third module is the spring reloader 
(http://svn.apache.org/repos/asf/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-spring-reloader/)
 that wraps a Spring context and performs the restarts of the Spring 
application context whenever necessary.


This could be good starting point, because my error-messages are talking
about missing refresh-calls to springs appCtx. I will look...

Another hint that might help: When a class or an interface, that is loaded
by the RCL, is proxied or rewritten by Spring AOP, this leads to exceptions
after the first reload. I guess this is a problem with the RCL
implementation (Apache Commons JCI) but I haven't had time to write a test
case that proves this statement.

Apart from problems with Spring Security and Spring AOP, the third known 
issue is session handling. If you put an object that is loaded by the

reloading classloader into the session, you will run into a class cast
exception after the first reload occured because the instance of the
reloading classloader has changed.

If you want to route around these problems, create a module that contains 
all those classes that should not be loaded by the reloading classloader

and add it as a dependency to your module.

HTH


Yes, I would guess ;) But besides RCL, how would this 


What does this refer to? If it refers to the list of know issues, then you 
don't have to worry. The RCL stuff is only used when cocoon:rcl is invoked for a 
Cocoon block. This Maven goal creates a web application that loads the block and 
integrates a reloading classloader.


Using cocoon:deploy doesn't do any of these classloading magic. The only 
exception is a shielding classloader that reverses the classloader hierarchy 
(the web app context classloader becomes the first one) but it is turned off by 
default.



look within a (e.g.)
Tomcat deployment, where RCL is not in scope. (I would love to test, but as
you can see at [1], I've actually got deployment troubles with Tomcat)


You could try to switch to the shielding classloader 
(http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/deploy-mojo.html 
and http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/1262_1_1.html) 
which would load Xerces/Xalan of WEB-INF/lib with a higher priority those loaded 
by the shared classloader of Tomcat or the application classloader.


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: Confused over Coccoon vs. Spring

2008-03-31 Thread Reinhard Poetz

Pierre-Yves Saumont wrote:
Yes, this is correct. Cocoon 2.1 was based on Avallon. Spring is 
definitely a much better option. There is a tutorial for version 2.2 
with a Spring example. But be carefull, if you follow the tutorial, you 
will have a very buggy example. (But a working one!)


What do you mean by buggy?

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: Confused over Coccoon vs. Spring

2008-03-31 Thread Reinhard Poetz
right. I fixed this last week for the upcoming final release. Thanks for 
reporting anyway!


Pierre-Yves Saumont wrote:
If you follow the tutorial, you will end with two blocks containing the 
same classes and the same beans (same id). In that case, no one can tell 
which class and which bean is used. In my case, bean from one block is 
injected with the property of the other block. Of course, as the two 
classes and the two property values are the same, no one can notice 
anything. But if you customise the two classes and the two property 
values, you will get very strange results!


Reinhard Poetz a écrit :

Pierre-Yves Saumont wrote:
Yes, this is correct. Cocoon 2.1 was based on Avallon. Spring is 
definitely a much better option. There is a tutorial for version 2.2 
with a Spring example. But be carefull, if you follow the tutorial, 
you will have a very buggy example. (But a working one!)


What do you mean by buggy?


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: Getting the request query parameters in the XML

2008-03-27 Thread Reinhard Poetz

Kjetil Kjernsmo wrote:

All,

I need to access the query parameters from a GET request in my XSLT, and I 
have thought of several ways to do this, but all seems cumbersome, so I'm 
supposing I've lost something trivial.


What would have been neat is something ol' AxKit's QueryParam could be done:
http://search.cpan.org/~nachbaur/AxKit-XSP-QueryParam-0.02/lib/AxKit/XSP/QueryParam.pm#param:enumerate/
i.e., just say in the JX that I want all query parameters, and there they are.

If there is no way to do that, I could do something like it in a controller we 
allready have. We allready do stuff like

bizData.put(result-list, queryResult);
res.sendPage(xml/sparql-result, bizData);
and it would be OK if I could just dump the query parameters here, but it 
seems there is no other way than build the XML manually by looping over the 
queryparameters, which again seems unnecessarily cumbersome.


You could use JXTemplate here:

 jx:forEach var=p select=${cocoon.request.getParameterNames()}
   p${p}=${cocoon.request.getParameter(p)}/p
 /jx:forEach

HTH

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: Servlet via Servlet Services only

2008-03-25 Thread Reinhard Poetz

Vadim Gritsenko wrote:

On Mar 25, 2008, at 9:21 AM, Grzegorz Kossakowski wrote:

Robin Wyles pisze:

Hi,

I have a servlet (eXist db) configured as a block using
blockServlet.xml, this works well - my other blocks are able to perform
DB operations using eXist's REST API through servlet services. But, is
there a way I can make my eXist block 'private', i.e. only available via
servlet services and not mounted to any publicly available path?


What about creating Spring AOP's advice on service() method? You could 
check there type of Request
object and if it's non-SSF instance then you could return HTTP 405 
(Method Not Allowed) status code

as response.


IMHO Robin's scenario is not unique and ability to declare 'internal' 
servlets should be a standard feature of SSF.


I agree with Vadim.

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: designing with 22-blocks

2008-03-18 Thread Reinhard Poetz

Patrick Heiden wrote:

Hello together!

After one week constantly comming to grasp with usage of cocoon 2.2 there are
still several things wich are confusing.


snip/

Patrick, many thanks for your thoughts. They are well appreciated. As you might
guess, our main problem is the lack of spare time to follow your suggestions.

What would you consider being the three most important things about our
documentation to be improved?

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: application-context loading order

2008-03-14 Thread Reinhard Poetz

Joerg Heinicke wrote:

On 13.03.2008 06:21, Patrick Heiden wrote:

Could somebody please explain in wich order springs application 
context is created (out of all 'block-specific' contexts inside 
META-INF/cocoon/spring/*.xml).


I don't think the order of the block's spring.xml matter since AFAIK a 
child context is created for every block extending a common parent 
context. So inside a block you only have access to the block's beans and 
the one from the parent context.


that's not correct: All bean declared in META-INF/cocoon/spring/*.xml are loaded 
into the global application context. The files are ordered alphabetically.


There also exist *sitemap* local beans which are only available from within a 
particular sitemap.


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: NTLM with the authentication framework cocoon 2.2

2008-03-04 Thread Reinhard Poetz

rossputin wrote:

Hi,

has anyone done any work on integrating NTLM support with cocoon-auth in
cocoon 2.2.  Or does anyone know of any documentation on it?  Everything is
working great with auth from a DB, but now I need to play with windows
integration.


IIUC you have to implement your own security handler that access the user 
registry. See http://cocoon.apache.org/2.2/blocks/auth/1.0/1317_1_1.html


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: [2.2] Basic question on new version of Cocoon

2008-02-19 Thread Reinhard Poetz

kamal wrote:

Hi,
I have finally got around to looking at Cocoon2.2 and I am having 
problems understanding a couple of things:


1. What happened to XSPs? We extensively use XSPs at work and would 
require either a XSPs or a valid replacement.


XSP hasn't been migrated to 2.2 yet. The replacement is Cocoon Template.

2. Right now, we have one instance of Cocoon and have setup the 
mount-table.xml file to point to different locations on our harddrive. 
We have found this mechanism invaluable.However, I see little 
documentation on how deployments (in a non jetty environment) are 
managed. Am I right in thinking that this functionality can be achieved 
using sitemap redirection?
3. I ran through the instructions on the website and I couldn't get 
thedemos to work. Neither could I hit localhost:. Any suggestions on 
how I debug this?


Which instructions exactly did you go through and at what point did you get 
stuck? (After you have been able to go through the tutorials, we can discuss 
deployment and the configuration of the development environment.)


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: webapp and blocks

2008-02-18 Thread Reinhard Poetz

Andre Juffer wrote:

  Reinhard Poetz wrote:
Apart from that, having a block doesn't necessarily require a Cocoon 
web application with configured servlet services being part of it. 
It's also a valid use case to have blocks that only contain Java 
resources and Spring beans (e.g. for domain specific logic).




If this block would contain only classes and relevant resources 
pertinent to these classes that otherwise have absolutely no knowledge 
at all of cocoon, it should not even be required to create a cocoon 
block. Such a set of classes could be contained in a standard maven 
project, which can be created like


mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app

(see 
http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html)


One would simply use the standard install goal to create a jar upon 
which the webapp would depend. The only problem I can see at this point 
is an application-context.xml that is possibly contained in that jar. 
The cocoon-based webapp only needs to be made aware of that file. But 
this could possible handled by an import statement in the cocoon 
application.context.xml (see for instance 
http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-factory-instantiation) 


You only have to put your Spring bean configuration file (*.xml) into the 
META-INF/cocoon/spring/ directory. Cocoon will pick it up automatically and add 
all components to the global Spring application context.


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: rcl including jars for jetty

2008-02-18 Thread Reinhard Poetz

anil wrote:


Hi Reinhard -

Thanks for your advice - I followed your steps and the rcl plugin did
acknowledge that the chiba jars were available. Many thanks for your
assistance.

Looking through the documentation for the cocoon-maven-plugin I've been
trying to find out if there is a way to get other configuration files (i.e.
not the web.xml) to appear in the target/rcl/webapp/WEB-INF directory - I
realise that there is an applicationContext.xml  log4j.xml, but I would
also like to store the chiba-config.xml file here as well.

At the moment I am copying this by hand to the location - is there any way
to do this when the rcl goal gets run? For instance, could I place the file
in some directory under META-INF/cocoon and have the plugin pick up teh file
and store it in the WEB-INF?

Looking at the documentation, it doesn't appear possible at the moment.


You are right, that's currently not supported since usually it is good enough to 
put a resource onto the classpath.


Could you create a Jira issue for that feature request please? Maybe I have some 
time to work on it before we release the plugin.


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: [C2.2]: Could the RCL reload other blocks as well ?

2008-02-17 Thread Reinhard Poetz

Luca Morandini wrote:
I know I'm asking much, maybe too much... but it would be nice to have 
an rcl.properties like this:

org.cocoondev.geoid-samples.service%classes-dir=./target/classes
org.cocoondev:geoid-core%classes-dir=../geoid-core/target/classes

...and having geoid-samples reloads itself *and* geoid-core whenever 
geoid-core is modified.


Is at all possible ?


yes, it's possible and recommended. See 
http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/1298_1_1.html


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: webapp and blocks

2008-02-17 Thread Reinhard Poetz

Andre Juffer wrote:

Hi all,

Suppose I am building a 'Cargo' application. From a pure Java
perspective, I would have domain modules such as customers, shipping,
billing, etc, placed in packages like org.foo.cargo.customers,
org.foo.cargo.billing, org.foo.cargo.ui, etc. With maven I would create
a project folder that would contain a single src directory where all the
packages and resources for this application would go.

In the case of a cocoon-based (version 2.2) webapp, would it be correct
to say that the aforementioned domain modules could correspond to
separate 'blocks', each having their own set of xml, xsl, cforms, flow, 
java classes, etc files. The Cargo webapp would depend on

these blocks. The folder structure could look like:

./cargo/customers-block
./cargo/billing-block
./cargo/shipping-block
./cargo/cocoon-app (this includes a pom.xml stating the dependency on
the three other blocks).

Would this organization conform to what is considered as good practice
for building a web application with cocoon 2.2?


yes, sounds reasonable.

 What exactly would go to

 the src folder of the ./cargo/cocoon-app, besides WEB-INF containing
web.xml, application.context.xml, etc. There are also 
application.context.xml files in the other blocks. The Carlo application 
would rely on Spring for bean creation, database access and transaction 
management.


each block can put its Spring bean definitions into META-INF/cocoon/spring. All 
those beans are loaded into the _global_ Spring bean context.


Would it make more sense to have a separate block 
('classes-resources-block') for all Java classes

instead of distributing them over the various blocks?


yes but I would want to find a better name that reflects the classes that it 
contains. Too general names usually mean that the architecture needs some 
refinement.


Apart from that, having a block doesn't necessarily require a Cocoon web 
application with configured servlet services being part of it. It's also a valid 
use case to have blocks that only contain Java resources and Spring beans (e.g. 
for domain specific logic).


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: webapp and blocks

2008-02-17 Thread Reinhard Poetz

Andre Juffer wrote:

Would this organization conform to what is considered as good practice
for building a web application with cocoon 2.2? What exactly would go to
 the src folder of the ./cargo/cocoon-app, besides WEB-INF containing
web.xml, application.context.xml, etc. 


That's more or less all that you need. Note that a web application is only 
required to build a deployable artifact (i.e. a WAR file) and if you use Maven 2 
this only requires adding all your blocks as dependencies to your web 
application module (pom.xml).


If you don't build your web application using Maven 2, you only have to make 
sure that your build mechanism puts all blocks into WEB-INF/lib.


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: Available Cocoon Blocks

2008-02-17 Thread Reinhard Poetz

Andre Juffer wrote:

Dear All,

This concerns the Available Cocoon Blocks at 
http://cocoon.apache.org/2.2/blocks/


As I understand it, these are NOT included in the core blocks. Is this 
correct? 


yes

Would this imply that whenever one decides to use for instance 
flow and cforms in a given block, a dependency on these two blocks must 
be explicitly stated in the given block's pom.xml?


yes

After creating a test block (following he guideline at 
http://cocoon.apache.org/2.2/1159_1_1.html), it appears that an 
dependency on flow in fact is already included in the pom.xml, but to 
use cforms, one apparently has to state this explicitly. Would that not 
contradict the earlier observation above?


Adding cocoon-core as a dependency does not include any of the blocks 
automatically to your custom block. The archetype that you used created a pom 
file that also adds the cocoon-template and the cocoon-flowscript block as 
dependencies in order to demonstrate their usage.


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: [C2.2]: Forms block

2008-02-17 Thread Reinhard Poetz

Andre Juffer wrote:

More questions about blocks, in particular the forms block.

I am trying to get a form going that worked very fine with C2.1, 
according to the migration guide at 
http://cocoon.apache.org/2.2/blocks/forms/1.0/1351_1_1.html


The first step required a change in 
src/main/resources/META-INF/cocoon/spring/servlet-service.xml


which currently now looks exactly like:

?xml version=1.0 encoding=UTF-8?
beans xmlns=http://www.springframework.org/schema/beans;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:servlet=http://cocoon.apache.org/schema/servlet;
  xsi:schemaLocation=http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://cocoon.apache.org/schema/servlet 
http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd;


  bean id=com.tribc.sopas.sops.service 
class=org.apache.cocoon.sitemap.SitemapServlet

servlet:context mount-path=/sops context-path=blockcontext:/sops/
  servlet:connections
entry key=ajax value-ref=org.apache.cocoon.ajax.impl.servlet/
entry key=forms 
value-ref=org.apache.cocoon.forms.impl.servlet/

  /servlet:connections
/servlet:context
  /bean

/beans

So far so good. I made a change in one flow script, adding:
cocoon.load(servlet:forms:/resource/internal/flow/javascript/Form.js); 
and some adjustment in the sitemap, again following the migration 
guidelines. I have no means to test this all because of the following.


The addition in servlet-service.xml requires the existence of other 
beans with refs org.apache.cocoon.ajax.impl.servlet and 
org.apache.cocoon.forms.impl.servlet. These do not exist and 
consequently 'mvn jetty:run' utterly fails with the message:


Caused by: org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'com.tribc.sopas.sops.service': Cannot 
resolve reference to bean 'org.apache.cocoon.ajax.impl.servlet' while 
setting bean property 'connections' with key [TypedStringValue: value 
[ajax], target type [null]]; nested exception is 
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean 
named 'org.apache.cocoon.ajax.impl.servlet' is defined


Is it expected that one must include all these beans definitions your 
self in some application-context.xml? Also, must one include the 
dependencies on the forms blocks into a pom.xml yourself.


yes, you have to add the forms block as a dependency yourself. Since the forms 
block has a dependency on the ajax block you don't have to add it yourself then. 
 (see 
http://repo1.maven.org/maven2/org/apache/cocoon/cocoon-forms-impl/1.0.0-RC1/cocoon-forms-impl-1.0.0-RC1.pom)


I don't mind to add all of this of course, but this is not very clear 
from the documentation. It is cumbersome though.


Feel free to add your comments or even better to improve the docs when you think 
that things are unclear or incomplete.


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: rcl including jars for jetty

2008-02-17 Thread Reinhard Poetz

anil wrote:

Hi -

I'm trying to integrate a 3rd party servlet filter into a cocoon block I'm
creating. I'm using rcl  trying to patch the web.xml generated by the rcl
plugin using the xpatch mechanism.

The patching of the web.xml seems to be fine - I can see the web.xml built
and my changes are visible - but when I bring up run the jetty:run goal on
the block jetty cannot find jar file for the servlet filter that I have
integrated.

What I have done is this:

1) Added the servlet filter dependency to the pom.xml for my block

2) created some *.xweb files within the cocoon/xpatch directory

When I run mvn jetty:run I get the following error:

javax.servlet.ServletException: Cannot load filter
org.chiba.web.filter.XFormsFilter
at
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.init(ReloadingServletFilter.java:74)

[snip]

Caused by: java.lang.ClassNotFoundException:
org.chiba.web.filter.XFormsFilter



So effectively jetty can't find the jar file that it needs to start up the
filter. I would have thought that adding the jar as a dependency within my
pom.xml would be all I need to do.

Can anyone clarify how I should approach this? Am I doing the right thing?


yes, sounds correct to me.


I tried to find some documentation on the rcl plugin in case there was some
configuration, but the link to the configuration javadocs seems to be broken
- the location is:
http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/1297_1_1.html.

Could someone also explain the significance of the rclwrapper.urlcl.conf
file - this seems to contain a list of directory locations to jars within my
block, but the list is not exhaustive, and interestingly the jar files that
contain the servlet filter I'm trying to integrate are not listed. 


rclwrapper.urlcl.conf is used to build the web application classloader. It has 
to contain all libraries that are needed to run your project. It is created by 
reading the classpath that is calculated by Maven which means that adding your 
project as dependency should be all that you have to do.


In order to verify if everything is correct, use 'mvn dependency:resolve' and 
check if the dependency (chiba) is listed.
Finally, one further idea: After adding a dependency to your pom.xml file, you 
have to run 'mvn cocoon:rcl' again.


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: rcl including jars for jetty

2008-02-17 Thread Reinhard Poetz

anil wrote:

After posting the above message I decided to try and find out if the
rclwrapper.urlcl.conf file influences what's deployed to the jetty container
when using the rcl plugin. In my pom.xml I removed the executions section
of the cocoon-maven-plugin so that running jetty:run didn't run the
cocoon:rcl goal.

I then ran the cocoon:rcl goal by hand and updated the rclwrapper.urlcl.conf
file so that it had references to the jars I needed within my repository.
This seemed to work, and jetty now seems to be aware of the jar files
required for the servlet filter.

Obviously I'd really like to find out how to ensure that the rcl plugin
picks up the paths to these jar files automatically so I don't need to edit
rclwrapper.urlcl.conf by hand.


As suggested in my previous mail, use 'mvn dependency:resolve' to find out if 
Maven resolves your dependency correctly.



After all of this though, I'd like to follow up my initial posting with a
supplementary question if I may:

The servlet filter I'm trying to integrate requires a configuration file -
which by default can be found in the WEB-INF directory. I would like to keep
the config in this location if I can but how can I tell the rcl plugin to
incorporate this config file within the WEB-INF directory that it builds?


The rcl goal adds all META-INF/cocoon/xpatch/*.xweb patches to the result 
web.xml of the web application that it creates.



And also, when I integrate this into a cocoon webapp is there any way I can
update the build process so that the config file stored in my block gets
copied to the WEB-INF area of the actual cocoon webapp.


The deploy goal of the Cocoon Maven plugin also adds all the 
META-INF/cocoon/xpatch/*.xweb patches. Otherwise it wraps the Maven war plugin.



If there's any complete source of information on using the rcl plugin  also
how I should integrate config  other things into a cocoon webapp directory
structure I'd be very interested in hearing about it.


See

http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/plugin-info.html
http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/1359_1_1.html
http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/1361_1_1.html

(+ all pages referenced from there)

Definitly not complete but at least a starting point.

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: [C2.2]: Unable to log on a logger other than root

2008-02-16 Thread Reinhard Poetz

Luca Morandini wrote:
I'm trying to divert the output of a reader of mine to a logger named 
geoid, to no avail so far.


The relevant fragments of log4j.xml are:
...
  appender name=GEOID_APPENDER class=org.apache.log4j.FileAppender
param name=File value=\${logs.dir}/geoid.log/
param name=Append value=\${logs.append}/
layout class=org.apache.log4j.PatternLayout
  param name=ConversionPattern value=%d{ISO8601} %t %-5p %c{2} - 
%m%n/

/layout
  /appender

  logger name=geoid additivity=false
level value=\${logs.level}/
appender-ref ref=GEOID_APPENDER/
  /logger
...

Actually, geoid.log is opened on the file system but the output of my 
reader (done using  getLogger().debug(...) ) is diverted to the root 
logger (cocoon.log) and geoid.log remains 0 bytes :(


Do you use the Cocoon Maven plugin (cocoon:rcl)?

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: cocoon 2.2 release?

2008-02-16 Thread Reinhard Poetz

Edward S wrote:

Hey guys,
 
when is the official release planned for cocoon 2.2??


I expect it for March.

I see on the site, tht 2.2 RC2 was released a few months ago. Where can 
i download it from?


For RC2 we have only put the release artifacts into the public Maven 2 
repository (http://repo1.maven.org/maven2/org/apache/cocoon/). If you use Maven 
2, Ivy or Ant+Maven2-Ant-tasks this is all that you need.


We will create 'normal' release artifacts for the final release though.

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: cocoon.context.getRealPath cocoon 2.2

2008-01-22 Thread Reinhard Poetz

anil wrote:

Hi -

Just to update this posting with my investigations - I've managed to extract
the file contents within my spring bean.

The basic problem was the way I was creating the file object - the path
returned by the cocoon.context.getRealPath() method was a URI  when
instantiating my File object I needed to create a URI object first.

Therefore it was:

URI fileURI = new URI(output of cocoon.context.getRealPath);
File file = new File(fileURI);

rather than just new File(output of cocoon.context.getRealPath);

Sorry - I should have noticed this - I assumed that I should be able to pass
the abstract path into File object directly - I blame it on the late nights!

One thing I still don't really understand though is that I'm still unable to
get a path to the resource that I want to access through my spring bean as
cocoon.context.getRealPath(xqy/test.xqy) still returns null. In order to
get round this I do:

var fullPath = cocoon.context.getRealPath(/) + xqy/test.xqy;

If anyone could clear up that confusion I'd be very grateful.


Just wondering: Why can't you use the source resolver?

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: 2.2 cocoon-cli

2008-01-14 Thread Reinhard Poetz

Martin Heiden wrote:

Hi!

Reinhard Pötz wrote:


I expected 2.2 as the next version of cocoon. What about the 2.2 release?
There are some open tasks left but I expect that we can start the release 
process at the end of January.


Will the release of cocoon 2.2 include the cocoon-cli? I noticed that
this module currently isn't included in the core's pom and istn't part
of RC2.


no, 2.2.0 will most probably not ship containing a CLI. I'm sorry.

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: map:read options

2008-01-14 Thread Reinhard Poetz

Romain Slootmaekers wrote:

Robin Wyles wrote:

Hi Romain,

On 14 Jan 2008, at 13:40, Romain Slootmaekers wrote:


Hi,

I've been trying to use map:read to read a file from a location on 
the fs outside the cocoon root.


http://cocoon.apache.org/2.2/core-modules/core/2.2/846_1_1.html
is rather sparse, but I tried:

map:match  pattern=**.msi
   map:read type=resource
   src=installer.msi
   mime-type=application/octet-stream /
/map:match


and alternatives with ../ ./ / aso. nothing seems to work with mvn 
jetty:run-war)


The question is: can I use map:read for this, or need I write a 
little servlet ?



I think you should be able to, have you tried using an absolute path 
to the file like so?


 map:read type=resource
   src=/absolute/path/to/your/file/installer.msi
   mime-type=application/octet-stream /


Yes the file:///C:/some path/installer.msi works

but I would like to have a relative path as the app needs to be relocatable


Where *exactly* do you want to put the file? Should it become part of the web 
application or is it located outside?


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: best wishes for 2008: 2.1 vs. 2.2

2007-12-29 Thread Reinhard Poetz

Ralph Goers wrote:

My wish for Cocoon 2.2 has always been that
1. The download of Cocoon would be nothing more than installing a 
maven plugin.
2. You'd use a Maven archetype to create a starter project. Ideally, 
this is how the sample site should get created.
3. Building your project would automatically download the rest of cocoon 
based upon the dependencies specified in the created project.
4. Building a project thus requires documentation on all the available 
blocks, the services they provide, and how to invoke them.


Unfortunately, I am still almost entirely focused on Cocoon 2.1 so I'm 
not certain how close we have gotten to my wish, but I have a feeling 
that if we can't do this today the effort to get there is pretty minimal.


1-3 is already in place.

@4: There is already documentation available but it's not as complete as I would 
like to see it :-(


What kind of documentation is missing most of all?

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: RCL, Session and ClassCastException

2007-12-29 Thread Reinhard Poetz

Robin Wyles wrote:

Hi,

When developing using the RCL it seems that after I update any file that 
triggers a reload (e.g. sitemap) any references in my Java code to 
objects stored in the current session result in a ClassCastException. 
Debugging shows that the object is still there in the session after the 
reload, and it is of the correct class, so does anyone know why I should 
get this error?


The object that you put into the session is loaded by one classloader and then 
after a reload you cast it using another one.


This seems to be a bug in the reloading classloader or the way how we use it. 
Unfortunatly I haven't had the time yet to create a test case that demonstrates 
the problem in an isolated environment so that the Commons JCI guys can have a 
look at this problem (if it's their problem).


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: RCL, Session and ClassCastException

2007-12-29 Thread Reinhard Poetz

Torsten Curdt wrote:


On 29.12.2007, at 19:40, Reinhard Poetz wrote:


Robin Wyles wrote:

Hi,
When developing using the RCL it seems that after I update any file 
that triggers a reload (e.g. sitemap) any references in my Java code 
to objects stored in the current session result in a 
ClassCastException. Debugging shows that the object is still there in 
the session after the reload, and it is of the correct class, so does 
anyone know why I should get this error?


The object that you put into the session is loaded by one classloader 
and then after a reload you cast it using another one.


Correct. A classloader is somewhat like a namespace in xml.

 a:tag/ != b:tag/

Objects can only be casted if their classes have been loaded by the same 
classloader. No matter they are maybe loaded from the same class file.


This seems to be a bug in the reloading classloader or the way how we 
use it. Unfortunatly I haven't had the time yet to create a test case 
that demonstrates the problem in an isolated environment so that the 
Commons JCI guys can have a look at this problem (if it's their problem).


This could be changed 


That would be really great!!!

...but it's a bit of an effort and adds to the 
complexity.


I think it would be worth changing the implementation because there are many 
people that can't or don't want to avoid the usage of sessions.


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: What is COB-INF?

2007-11-19 Thread Reinhard Poetz

Mansour wrote:

Mansour wrote:
In Cocoon 2.2 the generate block contains a folder called COB-INF 
which I think stands for Cocoon Block, may be. However, what is this 
directory and where can I configure it's name?


Why would the root of the block be /COB-INF when referring to it in 
the sitemap map:generate src=demo/welcome.xml/
Then in the /META-INF/cocoon/spring/demo-application-context.xml file 
it becomes bean id=demo class=demo.MyBean scope=singleton ?!!


I really don't understand this. I find it very confusing. Can someone 
help here?
I found what I was looking for here 
http://cocoon.apache.org/2.2/core-modules/core/2.2/1263_1_1.html


I 'll appreciate some comments about why is this structure for a block.


A Cocoon block may contain Java classes, component declerations (Avalon and 
Spring style) and Cocoon applications. The directory structure was derived from 
these needs because we had to make sure that everything has its own place:


  /COB-INF/** The Cocoon application (sitemaps, templates, etc.)
  /META-INF/cocoon/** All configuration files
  /** Java classes and Java resources

And yes, COB-INF stands for COcoon block and the name was chosen in analogy to 
e.g. WEB-INF.


HTH

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Apache Cocoon 2.2-RC2 Released

2007-11-03 Thread Reinhard Poetz


  The Apache Cocoon Community is proud to announce the second release
  candidate of Cocoon 2.2.

  Apache Cocoon is a Spring-based framework (since version 2.2) built
  around the concepts of separation of concerns and component-based development.

  Cocoon implements these concepts around the notion of component pipelines,
  each component on the pipeline specializing on a particular operation.

  Cocoon 2.2 introduces blocks. A block is the unit of modularization
  in Cocoon (in comparison: Eclipse uses the term plugins, OSGi uses bundles).
  Everything that goes beyond what Cocoon provides in its core modules
  (Spring integration, sitemap and pipeline implementation) is provided as
  block (see below). Custom Cocoon applications are also developed as blocks.
  A block can provide the following features:

* general servlet services (any servlet can be managed by the Cocoon
  servlet-service framework),
* special services that provide pipelines as services,
* component services (Spring beans, Avalon services/components),
* a container for classes and resources.

  A block is packaged as a Java archive (jar) following certain conventions
  concerning the directory structure.

  Find information about the new features at
  http://cocoon.apache.org/2.2/1420_1_1.html.

  For more information about Apache Cocoon 2.2, please go to
  http://cocoon.apache.org or follow our getting started guide at
  http://cocoon.apache.org/2.2/1159_1_1.html.

  The release artifacts are available from the central Maven repository
  (http://repo1.maven.org/maven2/).


- o -


  Additionally we also want to announce some more releases:

  SUBPROJECTS
  ---

  * Cocoon Servlet-Service Framework 1.0.0-RC1
The Servlet Service Famework makes it easy to use servlets as components
which can communicate with each other. The current implementation is based
on Spring 2.0. There are no dependencies on Cocoon core libraries at all.

http://cocoon.apache.org/subprojects/servlet-service/1.0/

  * Cocoon Configuration 1.0.1
The Cocoon Configuration subproject provides basic support for configuring
web applications. Its current implementation, the Spring Configurator, is a
useful component providing support in common configuration issues when using
the Spring framework. There are no dependencies on Cocoon core libraries at
all.

http://cocoon.apache.org/subprojects/configuration/1.0/

  BLOCKS
  --

  * Cocoon Ajax 1.0.0-RC1
Partial page and form reloads

http://cocoon.apache.org/2.2/blocks/ajax/1.0/

  * Cocoon Apples 1.0.0-RC2
Pure Java implementations of controller logic.

  * Cocoon Auth 1.0.0-RC2
Authentication and authorization of pipelines and control-flow based
Cocoon applications.

http://cocoon.apache.org/2.2/blocks/auth/1.0/

  * Cocoon Batik 1.0.0-RC2
Create Scalable Vector Graphics (SVG) using Cocoon pipelines.

http://cocoon.apache.org/2.2/blocks/batik/1.0/

  * Cocoon Captcha 1.0.0-RC2
A reader to create CAPTCHAs

http://cocoon.apache.org/2.2/blocks/captcha/1.0/

  * Cocoon Database 1.0.0-RC2
Direct usage of relational databases with sitemap components.

http://cocoon.apache.org/2.2/blocks/databases/1.0/

  * Cocoon Flowscript 1.0.0-RC2
Flowscript is a continuation-based implementation of Cocoon control
flow based on Rhino (Javascript/ECMAScript).

http://cocoon.apache.org/2.2/blocks/flowscript/1.0/

  * Cocoon FOP 1.0.0-RC2
Use Apache FOP, an XSL-FO driven print formatter to render pages to
PDF or Postscript.

http://cocoon.apache.org/2.2/blocks/fop/1.0/

  * Cocoon Forms 1.0.0-RC1
Cocoon has an advanced forms framework. Together with Flow and JXTemplates,
Cocoon Forms (or CForms) provides a solid basis for  building interactive
web applications. Cocoon Forms handles complex use cases while still being
simple enough to be used by non-Java-programmers who want to add forms to
their site.

http://cocoon.apache.org/2.2/blocks/ajax/1.0/

  * Cocoon Hsqldb-Client 1.0.0-RC2
JDBC access of a Hsql database

http://cocoon.apache.org/2.2/blocks/hsqldb-client/1.0/

  * Cocoon Hsqldb-Server 1.0.0-RC2
Start a Hsql database server as part of your Cocoon application.

http://cocoon.apache.org/2.2/blocks/hsqldb-server/1.0/

  * Cocoon HTML 1.0.0-RC2
Generators to deal with HTML.

http://cocoon.apache.org/2.2/blocks/html/1.0/

  * Cocoon Linkrewriter 1.0.0-RC2
Transformers to rewrite all elements containing links.

http://cocoon.apache.org/2.2/blocks/linkrewriter/1.0/

  * Cocoon Mail 1.0.0-RC2
Sitemap components to send emails.

http://cocoon.apache.org/2.2/blocks/mail/1.0/

  * Cocoon Template 1.0.0-RC2
XML-based templating

http://cocoon.apache.org/2.2/blocks/template/1.0/

  TOOLS
  -

  * Cocoon Maven plugin 1.0.0-M1
The Cocoon Maven plugin contains several goals that make the 

Re: Cocoon 2.2: Installation-trouble

2007-10-10 Thread Reinhard Poetz

Hanne Moa wrote:

Per today, the tutorial at http://cocoon.apache.org/2.2/1159_1_1.html
(http://cocoon.zones.apache.org/daisy/cdocs/g2/g2/g1/1159.html in Daisy)
is rather deeply flawed.

Following the recipe by the letter, running mvn jetty:run at the end,
leads to jetty running but showing an empty page and an exception
complaining that there is no block for '/', or to be exact:

javax.servlet.ServletException: No block for /
...snip...
javax.servlet.ServletException: No block for /favicon.ico
...snip...

So... either some steps are missing from the tutorial, the steps have
changed, or there are errors in the versions that maven fetches.

Tell me what to do and I'll see if I can update the tutorial.


What was the URL that you tried: http://localhost:/ or 
http://localhost:/myBlock1/? Only the latter one will work because by 
default the Maven plugin mounts a block using its name.


--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



[c22] Mounting a block at root /

2007-10-10 Thread Reinhard Poetz

Reinhard Poetz wrote:

Hanne Moa wrote:

Per today, the tutorial at http://cocoon.apache.org/2.2/1159_1_1.html
(http://cocoon.zones.apache.org/daisy/cdocs/g2/g2/g1/1159.html in Daisy)
is rather deeply flawed.

Following the recipe by the letter, running mvn jetty:run at the end,
leads to jetty running but showing an empty page and an exception
complaining that there is no block for '/', or to be exact:

javax.servlet.ServletException: No block for /
...snip...
javax.servlet.ServletException: No block for /favicon.ico
...snip...

So... either some steps are missing from the tutorial, the steps have
changed, or there are errors in the versions that maven fetches.

Tell me what to do and I'll see if I can update the tutorial.


What was the URL that you tried: http://localhost:/ or 
http://localhost:/myBlock1/? Only the latter one will work because 
by default the Maven plugin mounts a block using its name.


see http://cocoon.apache.org/2.2/1362_1_1.html, the last paragraph.

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



[c22] Mounting a block at root /

2007-10-10 Thread Reinhard Poetz

Hanne Moa wrote:

Reinhard Poetz wrote:

Hanne Moa wrote:

Per today, the tutorial at http://cocoon.apache.org/2.2/1159_1_1.html
(http://cocoon.zones.apache.org/daisy/cdocs/g2/g2/g1/1159.html in Daisy)
is rather deeply flawed.

Following the recipe by the letter, running mvn jetty:run at the end,
leads to jetty running but showing an empty page and an exception
complaining that there is no block for '/', or to be exact:

javax.servlet.ServletException: No block for /
...snip...
javax.servlet.ServletException: No block for /favicon.ico
...snip...

So... either some steps are missing from the tutorial, the steps have
changed, or there are errors in the versions that maven fetches.

Tell me what to do and I'll see if I can update the tutorial.

What was the URL that you tried: http://localhost:/ or
http://localhost:/myBlock1/? Only the latter one will work because
by default the Maven plugin mounts a block using its name.


The former. A difference that need to be more clearly marked, then.
2.1.x had something at '/' by default, right? What would one do to get a
block at '/', rewrite somewhere?

The favicon-problem is just a warning but how would one add a favicon?
This of course connects to how to get a block at '/' :)


see http://cocoon.apache.org/2.2/1362_1_1.html, the last paragraph.

--
Reinhard PötzManaging Director, {Indoqa} GmbH
  http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED]
_

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



Re: [Cocoon 2.2, Hibernate 3] Conflict in ehcache

2007-10-01 Thread Reinhard Poetz

Nacho Jiménez wrote:

Dear all,

I'm trying to migrate my Cocoon 2.1/Spring/Hibernate apps to Cocoon
2.2, and after a bit of banging my head against he wall, i finally
understood what's maven and how to create cocoon projects, etc.

I've created a cocoon 2.2 block with basic spring-hibernate
functionality, but when i try to run it into a jetty servlet
contanier (mvn jetty:run), all i get is a conflict between
ehcache-1.2.4, demanded by cocoon, and ehcache1.1, included by
hibernate:

Caused by: org.apache.maven.plugin.MojoExecutionException: There are
at least two artifacts with the ID 'ehcache':

ehcache:ehcache:jar:1.1:compile
com.unmardedatos:eMarketing:jar:1.0-SNAPSHOT
org.apache.cocoon:cocoon-core:jar:2.2.0-RC1
org.apache.cocoon:cocoon-store-impl:jar:1.0.0-RC1
net.sf.ehcache:ehcache:jar:1.2.4
ehcache:ehcache:jar:1.1:compile
com.unmardedatos:eMarketing:jar:1.0-SNAPSHOT
org.springframework:spring-hibernate3:jar:2.0-m4
org.hibernate:hibernate:jar:3.1.2
ehcache:ehcache:jar:1.1

What can I do to compile it?  I'm getting desperate here, so any help
will be greatly appreciated.


Have you tried to exclude the ehcache dependency from hibernate:3.1.2 in your 
pom.xml and run hibernate with ehcache:1.2.4?


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: [Cocoon 2.2] Why use a shielding repository ?

2007-08-27 Thread Reinhard Poetz

Olivier Billard wrote:

Hi all,

The Cocoon Maven plug-in can be configured given a 
useShieldingRepository configuration parameter. The effect is that all 
JARs / classes are moved from WEB-INF/lib and WEB-INF/classes 
respectively to WEB-INF/shielded/lib and WEB-INF/shielded/classes.


The Cocoon documentation [1] does not explain what is the purpose of 
this configuration option. Can anyone tell me, please ?

Thanks !


Hmm, I guess to make the change in the classloader hierarchy explicit.

(cc'ing dev - maybe Carsten can tell us about his intentions when he inroduced 
the parameter)


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: [GT2007] ANN: The 6th Cocoon GetTogether, Rome, October 2007

2007-08-23 Thread Reinhard Poetz

Gianugo Rabellino wrote:

During the traditional Hackathon, developers and users will team up to
discuss the Cocoon internals and work side by side on current Cocoon
issues.


I've created a wiki page to collect relevant information (ideas, who will come, 
etc.) about the Hackaton. See http://wiki.apache.org/cocoon/GT2007Hackaton


Please add your ideas/wishes/etc. !!!

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Multiple RCL locations with Eclipse

2007-08-21 Thread Reinhard Poetz

Grzegorz Kossakowski wrote:

Jean-Christophe Kermagoret pisze:

Hi,
I'm trying to use Eclipse to debug my cocoon app.

In my Jetty6 configuration, I have the following configuration :

   New id=cocoon class=org.mortbay.jetty.webapp.WebAppContext
 ArgRef id=contexts//Arg
 Arg/opt/src/openbluelab/myBlock1/target/rcl/webapp/Arg
 Arg//Arg
   /New

How to indicate various rcl locations, so updated files are used ?


How, have you tried to put multiple %classes-dir properties into one 
rcl.properties file? Does this work?


That's the way how it works for me.

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc



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



Re: Rome 2007

2007-08-07 Thread Reinhard Poetz

Merico Raffaele wrote:

Dear Community

I am still missing some details (date, location, agenda) regarding the
Cocoon GetTogether 2007 in Rome. Did I missed them? Can anybody provide me
with any further status information? 
Many thanks in advance.


see http://marc.info/?l=xml-cocoon-devm=118598387121470w=2

I guess that the official announcement will follow soon.

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: re-design of sitemaps

2007-06-06 Thread Reinhard Poetz

Stephen Winnall wrote:
Has anyone given any thought to a re-design of Cocoon's sitemaps in one 
of the new versions of Cocoon? I can see scope for improvement in the 
following areas:


1) modularisation


Cocoon 2.2 uses the servlet-service framework. See 
http://cocoon.zones.apache.org/daisy/cdocs/g2/g2/g1/1291.html



2) re-use of definitions (e.g. action sets, resources)


also see http://cocoon.zones.apache.org/daisy/cdocs/g2/g2/g1/1291.html. there is 
an example of a servlet-service transformer.



3) definition of a sitemap schema


http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd

4) requirement that sitemaps validate against that schema (would make it 
easier to write sitemap tools)


validation is off by default but can be activated, again only in Cocoon 2.2



These are just things that have bitten me. I'm sure other people  will 
be able to add to this list.


I realise that this strikes at the very heart of Cocoon and would mean a 
lot of work. But it seems to me such an obvious place for improvement 
that I wondered if anything was planned.


Thanks for your feedback!

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: re-design of sitemaps

2007-06-06 Thread Reinhard Poetz

Geert Josten wrote:
Would it be right to say that the intention of this XML 
schema is only to support a simple subset of all possible 
current Cocoon sitemaps? Can one then provide the missing 
functionality by writing one's own blocks using the 
servlet-service framework?


Have you tried validating your own sitemaps to this XSD yet? It contains
constructs that allow entry of unknown elements..


exactly

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Cocoon Productivity

2007-06-01 Thread Reinhard Poetz

Reinhard Haller wrote:

Reinhard Poetz schrieb:


I have been working on 
http://cocoon.zones.apache.org/daisy/cdocs/g2/g1/1370.html. I hope 
that it helps.



said first I have no knowlwedge of maven or cocoon2.2.

Your tutorials for me are typical examples of the problems regarding 
the   current cocoon documentation.


It's very valuable if you already know why and how to do what you want. 
It helps for nothing if you are a real beginner.


What can we expect from a beginner, when we write documentation?

 - Does he know how the request-response-cycle of the http protocol
   works?
 - Does he know what XML is?
 - Is he able to read (and write) XSLT?
 - Does he know what a servlet container is?
 - etc.

Compare this to tutorials for Netbeans, Eclipse or the JBoss IDE. 


hmm, those pieces of software are GUIs and not server-side applications.

Instead of showing what you do and possibly why you do it, you choose a 
set of very simple unrelated topics to achieve a very short and pregnant 
documentation for people which already know what they do.


I wouldn't say that they are unrelated but I agree with you that there is no use 
case behind them.


Simply put the screenshots of your Eclipse in the documentation, this 
explains much more than your text. Document your example (your first 
Cocoon application ...) from the very beginning, i.e. installation and 
setup within eclipse (from svn/from distribution) including the setup 
for the application server if needed. 


What's missing? Where did you get stuck?

Choose a real production 
application server instead of the bundled Jetty. Explain if it works 
with Plugins (WTP/JBoss IDE) and how.


IMO that's out of the scope of Cocoon. If we start to explain the deployment in 
a Bea weblogic server someone will ask, how those things work in IBM websphere, 
etc.
Cocoon is a web applications and we produce web archives (.war) that can be 
deployed into any complient servlt container. Having a war, you can use one of 
the illustrated tutorials of those containers to deploy your stuff there.


Providing the community with a non trivial tutorial that covers a 
website with structured templates for content, navigation and metadata, 
combined with a real world error handling would help to get new users an 
impression of the developement cycle and the structure of a cocoon 
application. If you also explain how to manage the different versions 
(cocoon, the cocoon application i.e. sitemap, the website templates and 
the web content) in one or more svn repositories then we have a sound 
base to start with and additional documentation can refer to this tutorial.


That's an awful lot of work, believe me.

With a screenshot based documentation everyone is able to see if there 
is a difference between the tutorial and his own computer and check out 
why there is a difference (other versions etc.).


For the reasons explained above I don't think it is a good idea to put IDE 
screenshots into the tutorials. Maybe putting in the result screens is helpful.


It would be great if some native-speaker could do a screencast of the 4 
tutorials. That would be even better than putting in screenshots IMO.



--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Cocoon Productivity

2007-05-29 Thread Reinhard Poetz

Niels van Kampenhout wrote:

Reinhard Poetz wrote:


snip/


Of course all the software engineering principles apply as much to
Cocoon applications as to any other, but most people find it difficult
to abstract away from the traditional frameworks for which they
learned their patterns, and apply their knowledge to Cocoon. And that's
no surprise, because Cocoon is so big, you can do so much with it, and
you can do it in so many ways. There are some best practices that are
known in the community, about which we speak at the GetTogether, but
that's pretty much it. You really have to learn everything about Cocoon
from the bottom up to find out how a particular type of application is
best set up in Cocoon. Getting up and running with your first Cocoon
project, and this is why this discussion started, is therefor really
difficult. Even the best documentation about how sitemaps and pipelines 
work will not solve this!


I have been working on 
http://cocoon.zones.apache.org/daisy/cdocs/g2/g1/1370.html. I hope that it helps.



What really works in my experience is turning the learning curve upside
down and providing people with patterns and components that simply work, 
and work transparently, so that at first they don't have to think about 
it. For example, Ard put a lot of work in making a website skeleton 
generator, which basically does that whole first step of deciding how to 
set up the application for you. The generated skeleton is preconfigured 
with subsitemaps, caching and everything, and it contains many little 
components that do things like paging of lists, mounting subsitemaps 
based on our specific navigation concept, etc. This skeleton generator 
meant a giant leap in productivity for our implementation partners. 
Getting up and running is no longer a problem, and through the pre set 
up skeleton the developers seem to get better at working with the Cocoon 
concepts much faster. At some point they might even discover that things 
could be done in a better way than in the skeleton!


could be a great enhancement for the Cocoon Maven 2 plugin

Of course we have our very specific use case of a web site presenting 
content from a certain CMS/Repository and our patterns may not work for 
other situations, but what I am trying to say is that in my opinion the 
missing link between Cocoon as a brilliant framework and Cocoon as a 
widely accepted framework is the lack of a mapping between the bare 
concepts and actual real-life application development.


Filling this gap is of course more difficult for Cocoon than for web 
sites based on a specific CMS, but a first step could be describing how 
some common use cases (there's a user list out there == use cases!) 
could be implemented with Cocoon, or even better, providing reference 
implementations that go much further than the current samples. In my 
dream I even see a wizard through which one can generate a preconfigured 
application skeleton for a number of different cases. These things exist 
for other frameworks you know!


(Blocks and Maven 2 archetypes might be a small first step towards this 
dream, I don't know, I haven't been able to check it out yet.)


The archetypes yes but blocks solve a different but somehow related problem.

Anyway, these are just my 2 cents (needed a lot of words for those 2 
cents though), I hope it is a useful contribution to this discussion. :-)


Thanks Niels. What I learn from your response is that it would be great to have 
an equivalent to the RoR scaffolding command. What skeleton apps would you like 
to generate?



--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Custom Cocoon 2.2 projects: Alternatives to Maven 2

2007-05-28 Thread Reinhard Poetz


I've started with a prototyp of a non-Maven Cocoon 2.2 archetype. It should be 
useful to people that want to avoid Maven 2 as build system for their Cocoon 
based projects. The mail below that I sent to the users lists explains in more 
detail how this prototyp is supposed to work.


Feedback would be much appreciated.


Reinhard Poetz wrote:

Carsten Ziegeler wrote:
If someone can document the steps (which we should do anyway) I can 
try and come up with the ant script.


I've started with a prototyp of a non-Maven Cocoon 2.2 archetype. You 
can download it from 
http://people.apache.org/~reinhard/cocoon-22-bootstrap.zip.


It contains a build.xml that has two targets:

 - webapp
   Build a web application
 - run
   Starts the webapp using Jetty

Some words to the directory structure:

[root]
 +-src
 |  +-webapp The Cocoon web application
 |  +-block1 A Cocoon demo block
 +-lib   All required libraries and Cocoon blocks
 +-jetty Minimum files to run a Jetty 6.1.3 instance
 +-build.xml The Ant build script

The Ant build is only a starting point but it shows how things are 
supposed to work together. It works well for me but it misses two 
important things in order to be useful for others:


1) make it simple to add just another _own_ block
   (adding a third-party block only means copying the libs into ./lib)

2) create a properties file that configures all servlet services to use the
   src/block1/src/main/resources/COB-INF files as block contexts

   Having this feature allows working on the sources with support for
   hot reload.

I think the build script shouldn't do much more because if people prefer 
to use Ant, they have their own way of building/deploying their Java 
applications anyway. Using this build script as template for that 
purpose, should give them a enough ideas to integrate it into their own 
build and deployment architectures.



--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Custom Cocoon 2.2 projects: Alternatives to Maven 2

2007-05-24 Thread Reinhard Poetz

Carsten Ziegeler wrote:
If someone can document the steps (which we should do anyway) I can try 
and come up with the ant script.


I've started with a prototyp of a non-Maven Cocoon 2.2 archetype. You can 
download it from http://people.apache.org/~reinhard/cocoon-22-bootstrap.zip.


It contains a build.xml that has two targets:

 - webapp
   Build a web application
 - run
   Starts the webapp using Jetty

Some words to the directory structure:

[root]
 +-src
 |  +-webapp The Cocoon web application
 |  +-block1 A Cocoon demo block
 +-lib   All required libraries and Cocoon blocks
 +-jetty Minimum files to run a Jetty 6.1.3 instance
 +-build.xml The Ant build script

The Ant build is only a starting point but it shows how things are supposed to 
work together. It works well for me but it misses two important things in order 
to be useful for others:


1) make it simple to add just another _own_ block
   (adding a third-party block only means copying the libs into ./lib)

2) create a properties file that configures all servlet services to use the
   src/block1/src/main/resources/COB-INF files as block contexts

   Having this feature allows working on the sources with support for
   hot reload.

I think the build script shouldn't do much more because if people prefer to use 
Ant, they have their own way of building/deploying their Java applications 
anyway. Using this build script as template for that purpose, should give them a 
enough ideas to integrate it into their own build and deployment architectures.


WDYT? Feedback, not only from Carsten, is much appreciated!

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Custom Cocoon 2.2 projects: Alternatives to Maven 2

2007-05-24 Thread Reinhard Poetz

Martin Heiden wrote:

What do you think of a web application that does it for the users? It
could be a simple list of blocks and core components with description and
a nice cocoon app that reads the actual poms and zips all important jars
before deliviring them to the user.


The problem with this idea is that is is difficult to integrate this with your 
build system. If you need Ant with dependency management, I'd have a look into Ivy.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Custom Cocoon 2.2 projects: Alternatives to Maven 2

2007-05-23 Thread Reinhard Poetz

Joerg Heinicke wrote:

On 22.05.2007 13:55, Reinhard Poetz wrote:

Compared with JSF and Struts Cocoon is very different. This means that 
you have to learn to think in Cocoon (btw, the same is true for 
frameworks like Tapestry or Wicket). Without good documentation it is 
very difficult to learn this way of thinking and hence my reasoning 
that we need better docs.


The annoying in the original post [1] is that the main reason for his 
frustration seems to be Maven and not necessarily Cocoon itself.


yes, Maven 2 is IMHO an even more complex beast than Cocoon (and I mean 2.1 
here!). Since I've been involved in two big projects (Cocoon 2.2 and one 
commercial project) that migrated to Maven 2, I've learnt to appreciate the 
power of Maven 2 but I remember how difficult it was to learn how Maven 2 works 
and how to solve real-world problems.


How can we help our upcoming 2.2 users? IMO there are two approaches which 
should be followed in parallel:


 1) make the usage of Maven 2 as simple as possible
- the tutorials take this into account
- we provide different archetypes

 2) offer an alternative to Maven 2

Option one is clear and is nearly finsihed. My question is regarding to option 
2: What do you expect, when you download Cocoon 2.2 in order to get your new 
Cocoon 2.2 project started?


Keep in mind that Cocoon 2.2 is split into a core and several blocks (template, 
forms, etc.). All of them are separate release artifacts and in contrast to 
Cocoon 2.1 they can and will be shipped as binaries again. (Note that I'm not 
talking about samples, that's something different.)


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Custom Cocoon 2.2 projects: Alternatives to Maven 2

2007-05-23 Thread Reinhard Poetz

Carsten Ziegeler wrote:

Reinhard Poetz wrote:
How can we help our upcoming 2.2 users? IMO there are two approaches 
which should be followed in parallel:


 1) make the usage of Maven 2 as simple as possible
- the tutorials take this into account
- we provide different archetypes

 2) offer an alternative to Maven 2

Option one is clear and is nearly finsihed. My question is regarding 
to option 2: What do you expect, when you download Cocoon 2.2 in order 
to get your new Cocoon 2.2 project started?


Keep in mind that Cocoon 2.2 is split into a core and several blocks 
(template, forms, etc.). All of them are separate release artifacts 
and in contrast to Cocoon 2.1 they can and will be shipped as binaries 
again. (Note that I'm not talking about samples, that's something 
different.)



Just some unstructured thoughts:

What about creating a zip containing the result of the cocoon archetype 
run? People could use this as a starting point for own projects without 
maven. 


I guess that you mean the result in ./target/webapp which is created by mvn 
install, don't you?


Adding blocks should then just be adding the jar which is 
available for download.


yep

The final step would be a document how to build your own block without 
maven, perhaps someone could come up with an ant script doing this stuff.


good idea, shouldn't be that difficult.

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Cocoon Productivity

2007-05-22 Thread Reinhard Poetz

Derek Hohls wrote:

Grzegorz
 
Do you think this a valid criticism - are WebObjects (whatever

those are) or Struts (Java coded framework) really that more
productive and easy to use than Cocoon??


no, but they come with better documentation.

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Cocoon Productivity

2007-05-22 Thread Reinhard Poetz

Derek Hohls wrote:
Reinhard 
 
I have been with Cocoon since the late '90s and as will continue

to use it unless forced otherwise... but is it really fair to say
that Cocoon is easy to use unless it (one day?) gets better
docs.  


Compared with JSF and Struts Cocoon is very different. This means that you have 
to learn to think in Cocoon (btw, the same is true for frameworks like Tapestry 
or Wicket). Without good documentation it is very difficult to learn this way of 
thinking and hence my reasoning that we need better docs.


Additionally, Cocoon 2.0 and 2.1 are huge frameworks and give you the impression 
that you have to learn everything before you can even start. It is also 
difficult to start your own Cocoon project and integrate it into your 
development process, to configure it for different deployment environments and 
to modularize it. Cocoon 2.2 will solve these problems and IMHO 2.2 will become 
competitive again.


Furtunatly Cocoon 2.2 isn't far anymore (the release of the first release 
candidate should happen next week) and some of us are working on a relaunch of 
the Cocoon website which will come together with a major overhaul of our 
documentation. Then we will see if our diagnosis concerning the technical 
problems and my assessment of the importance of documentation was correct.



I know this a FAC (frequently occurring complaint) - and
if I ever come into an IT fortune such as Mark Shuttleworth's
this will be the first area I will invest in!


You're welcome :-)

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Continuations and Clustering/Session Replication - help

2007-05-18 Thread Reinhard Poetz

Diogo Matos wrote:

Hi all,

I have a environment where I run 2 tomcat cocoon instances using session 
replication.


Using continuations I have a serious problem as I cannot replicate the 
continuationID across the 2 cocoon instances.


Is there anyway of using continuations and replicate them across the 2 
cocoon instances? Or am I forced to use sticky sessions only - which is 
a bummer


Any help is appreciated!


It is a know and unfortunatly unsolved problem: see 
https://issues.apache.org/jira/browse/COCOON-1425



--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Javaflow Samples Cocoon 2.2

2007-04-09 Thread Reinhard Poetz

Saskia Heesen wrote:

Do I have to change my configuration? How can I change my configuration?


AFAIK, the javaflow block hasn't been ported to work under 2.2 yet. Without 
having looked at it I believe that there is some work to be done. We will also 
have to migrate to latest commons-javaflow.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc



___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


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



Re: Can jx:import just import some element in a file?

2007-04-01 Thread Reinhard Poetz

jonpday wrote:


Rice Yeh wrote:

Hi,
  Can jx:import just import some element in a file? I find all examples
import the whole file specified in the uri. Can I just import some element
in a file?

Rice




One way of doing it (bit hacky) is to call another pipeline
(uri=http://{request.ServerName}:{request.ServerPort}/cocoon/otherPipeline#fragment;)
and configure that pipeline to return the fragments that you are looking
for.  Otherwise, I dont think it can be done reading a file from disk.  


no, not that I know of.

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: AW: Transform the output of the ValidationReportTransformers in XSL

2007-03-28 Thread Reinhard Poetz

[EMAIL PROTECTED] wrote:

Yeah ... that's exactly what I meant :)
Well the code is pretty easy to change, since I fixed my problem be removing it 
completely ;) Well I never worked with default-namespaces up till then (and I 
use Xml and Xsl quite intensively for the last 8 Years). The only question is, 
what the prefix should be?


the prefix doesn't matter, only the namespace does. Prefixes are only there for 
the developer's convenience within a particular XML document.



Would be easy to adapt (take about 5 Minutes to wrap-up a patch).

Chris 


PS: I tracked down my threading problem to Outlook 2007 in combination with an 
exchange-server that fetches it's mail using  some sort of pop-fetcher (giving 
every mail new IDs). I'll remove myself from this list with my company account 
and register with my private one ... maybe that helps. And if it doesn't, I'll 
simply create a new account and use a different Mail-Client just for 
Mailing-Lists.


thanks!

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Transform the output of the ValidationReportTransformers in XSL

2007-03-26 Thread Reinhard Poetz

[EMAIL PROTECTED] wrote:
[snip]
Could someone tell me why this is that way 


I think that the match rules apply to empty namespaces and not the default 
namespace.



and how I can convince the validation-report transformer to stop adding the 
namespace stuff to the output?

Well at the moment I got everything to work, by modifying the Transformers 
code, but that can't really be the optimal solution.


this might help, though haven't tested it:

xsl:stylesheet xmlns:v=http://apache.org/cocoon/validation/1.0; 
xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=2.0

  xsl:template match=/v:report
test
  xsl:copy-of select=v:error/
/test
 /xsl:template
/xsl:stylesheet

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Transform the output of the ValidationReportTransformers in XSL

2007-03-26 Thread Reinhard Poetz

[EMAIL PROTECTED] wrote:

Hi Reinhard,

No offence, but this looks really ugly ... 


Might be ugly for you but completly consistent. You have to declare a prefix for 
the namespace in order to get access to it within your xpath expressions.


On a different note, if you find this really ugly, have you ever used WSDL? ;-)


what is the intention of generating output that requires that type of hack?


first, that's not a hack. Second, the transformer produces XML and puts them 
into the http://apache.org/cocoon/validation/1.0 namespace. There is nothing 
wrong with it AFAICS.



P.S. Your mails are not added to the mail thread of the mail that you respond 
to. That makes it difficult to follow a discussion that you participate in. But 
maybe it's only me and a problem of Thunderbird.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Inactive Cocoon committers and PMC members

2007-03-14 Thread Reinhard Poetz


Cocoon is an open source project that has been existing for about 9! years. Many 
people helped us to grow and to develop and some of them became committers. 
According to our rules, every committer can join the Cocoon PMC.[1]


On our private@ mailing list we recently had a dicsussion about what we should 
do with those committers and PMC members who have become inactive in the 
meantime (yes, 9 years is a looong time).
I want to move this discussion to the public Cocoon mailing lists for two 
reasons: Firstly, there is no need to discuss such things in private and 
secondly, I would like to know what those who are not committers expect from us.


Let's start the discussion with the question:
Do people think it's useful to have an up-to-date list of committers/PMC 
members that contains information about who is active?


I want to share two thoughts:

 - the probably best source of information to find out whether a project and its
   committers are (in)active is looking at the mailing lists and the
   changes docs. What's the additional value of having a list containing
   the current activity state?

 - mainting a committers list containing the current activity state causes
   some bureaucracy for us. The less work we have the better.


So what do you think? (I will interpret no answers as nobody cares which is 
also an important information for us)




[1] http://www.apache.org/foundation/how-it-works.html#roles

--
Reinhard Pötz
Vice President, Apache Cocoon

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



Re: Skipping cocoon-rcl-webapp-wrapper?

2007-03-05 Thread Reinhard Poetz

Lally Singh wrote:


Is there a similar situation with avalon-framework-impl?


Make sure by using exclusions that you don't get any other Avalon or Excalibur 
dependencies than those that are coming from cocoon-core. If there are still 
wrong dependencies showing up, build by using the -X switch and look at the 
dependency graph resolution logs and find out which dependency is responsible 
and add an exclusion there.


Also be aware that commons-logging and commons-jxpath come with poms of poor 
quality. If you add them explicitly, take care of removing all unnecessary 
dependencies (see 
http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-core/pom.xml and 
http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/pom.xml)


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Ajax form reloading problem

2007-02-27 Thread Reinhard Poetz

Andrew Madu wrote:

Hi Grzegorz,


Please stop sending worthless e-mails if you want any further help. See
this sentences[1] for good advice:
Please also have some consideration for the other users on the list -
this is a busy list and we do not appreciate getting the exact same
message posted impatiently several times a day/week! Doing so is only
likely to make your question answered more slowly, or not at all, not
faster.


I appreciate and accept your email. If only we all had a 'put life on 
hold and wait' button, huh?! ;-)


I understand that you have to solve real world problems, but the Cocoon 
community is a community of mostly volunteers. If you need guaranteed service 
levels, I'm sure that there would be some companies which would provide support 
to you.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Spring Blocks question

2007-02-20 Thread Reinhard Poetz

Lally Singh wrote:

Hey all, quick question.

 With Cocoon blocks (using maven 2 archetypes), how are the spring
configurations connected together?  If I define a bean called 'peel'
in a block called 'banana', and I'm in another block, do I refer to it
as 'peel' or 'banana.peel' ?


Beans defined in COB-INF/config/spring are only available within the block, bean 
definied in META-INF/cocoon/spring are globally available and can be used from 
other blocks.


Answering your question: You have to use peel. This means that you have to 
take care for proper bean ids yourself.



 Or even better, some pointers to docs on this.. I'm still wading my
way through the wiki, etc.


Unfortunatly there isn't a complete documentation about this. The best starting 
point for questions concerning Cocoon with Spring is 
http://cocoon.zones.apache.org/daisy/cdocs-spring-configurator/g1/1304.html


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Ideas for student projects

2007-02-17 Thread Reinhard Poetz


Google announced the 3rd summer of code and this year. The Austrian Computer 
society launched a similar project, the OSS Contest Austria 2007. We as Cocoon 
project can make proposals about possible student projects.


If you have ideas for such projects, add them to 
http://wiki.apache.org/cocoon/StudentProjectIdeas2007. The more ideas we have, 
the better for us!


If you are Cocoon committer and interested in mentoring a project, add yourself 
to the mentoring section of the document. Adding yourself now only means that 
you are generally interested. Of course it's on you to finally accept a student 
application or not.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: cocoon 3: first step

2006-11-11 Thread Reinhard Poetz

Olivier wrote:

Reinhard Poetz wrote:

Olivier wrote:

   Hi all
Where can I find more information on cocoon 3 / OSGi
I've tried http://cocoon.zones.apache.org/daisy/cocoon3/g1/1153.html 
but all I can obtain is 404 error pages. Is somebody make this work ?


For the time being, Cocoon 3 is on hold. As the people at the Spring 
project have decided to provide an integration layer for OSGi (see 
http://www.springframework.org/osgi), we decided to wait for the 
outcome of this effort.


Apart from this Cocoon 2.2 (including _real_ blocks, see 
http://wiki.apache.org/cocoon-data/attachments/GT2006Notes/attachments/12-CocoonBlocks.pdf) 
has made good progress and we are close to the release of a second 
milestone (I guess some time in November.). If you don't want to wait, 
checkout trunk and follow the instructions at 
http://cocoon.zones.apache.org/daisy/cdocs-site-main/g1/1159.html, 
except that you have to use the SNAPSHOT versions of the archetypes 
instead.


Great, I've already checkout cocoon-2.2 and make it work (inside web 
container). Sure it's a great job.
I was looking how to proceed for adding some contribution I've build 
(Transactional File Writer Transformer for example). And I was wondering 
which version of cocoon I should target to dig the block system.


So I seem to be the cocoon 2.2 ?


if you checked out http://svn.apache.org/repos/asf/cocoon/trunk, yes.


Many thanks for the answer and for cocoon.


Thanks for your feedback! We consider Cocoon 2.2 core to be feature-complete. 
The missing thing is documentation, which is poor. We know about this and we are 
working on it. If you want to help, go to http://cocoon.zones.apache.org/daisy/ 
and register yourself and ask on [EMAIL PROTECTED] for being assigned the doc editor role.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc






___ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de


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



Re: Codeselector

2006-11-11 Thread Reinhard Poetz

Ralph Rauscher wrote:

Hello,

the cocoon documentation mentions a codeselector on 
http://cocoon.apache.org/2.1/userdocs/selectors.html. Anyone knows how 
to define this selector in the sitemap?


map:selector name=codeselector src=?/

Couldn't find any class in the cocoon sources that resembles a code 
selector.


I have never heard about a code selector. What do you want to achieve?

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc






___ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de


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



Re: cocoon 3: first step

2006-11-09 Thread Reinhard Poetz

Olivier wrote:

   Hi all
Where can I find more information on cocoon 3 / OSGi
I've tried http://cocoon.zones.apache.org/daisy/cocoon3/g1/1153.html but 
all I can obtain is 404 error pages. Is somebody make this work ?


For the time being, Cocoon 3 is on hold. As the people at the Spring project 
have decided to provide an integration layer for OSGi (see 
http://www.springframework.org/osgi), we decided to wait for the outcome of this 
effort.


Apart from this Cocoon 2.2 (including _real_ blocks, see 
http://wiki.apache.org/cocoon-data/attachments/GT2006Notes/attachments/12-CocoonBlocks.pdf) 
has made good progress and we are close to the release of a second milestone (I 
guess some time in November.). If you don't want to wait, checkout trunk and 
follow the instructions at 
http://cocoon.zones.apache.org/daisy/cdocs-site-main/g1/1159.html, except that 
you have to use the SNAPSHOT versions of the archetypes instead.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc






___ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de


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



Re: Running 2.2 Block and Avalon NoSuchMethodError

2006-11-09 Thread Reinhard Poetz

Patrick Refondini wrote:

Patrick Refondini wrote:

Hi,

while running my Cocoon 2.2 block ( mvn jett6:run ) I obtain the 
following exception:


(...)
Caused by: 
org.springframework.beans.factory.BeanDefinitionStoreException: 
Unexpected exception parsing XML document from ServletContext resource 
[/WEB-INF/applicationContext.xml]; nested exception is 
java.lang.NoSuchMethodError: 
org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.build(Ljava/io/InputStream;Ljava/lang/String;)Lorg/apache/avalon/framework/configuration/Configuration; 


(...)

Deleting the avalon-framework-4.1.3.jar lib from
${PROJECT}/target/${PROJECT}/WEB-INF/cocoon/lib/avalon-framework-4.1.3.jar 



After rebuilding the latest cocoon trunk (2.2) and moving the AJAX 
dependency from:


dependency
  groupIdorg.apache.cocoon/groupId
  artifactIdcocoon-ajax-impl/artifactId
  version1.0.0-M1/version
/dependency

to:
dependency
  groupIdorg.apache.cocoon/groupId
  artifactIdcocoon-ajax-impl/artifactId
  version1.0.0-M2-SNAPSHOT/version
/dependency

I did not obtain this behaviour anymore.


yes, Cocoon 2.2 was changed _internally_ in many parts over the last weeks.

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc



___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


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



Re: Question about Lepido

2006-08-17 Thread Reinhard Poetz

Terence Kearns wrote:

I had no idea what Lepido was so I googled it and found that someone
at apache had set up wiki for it. I assume you know about this?

http://wiki.apache.org/cocoon/Lepido


yes, I guess that Sylvain knows it as he created the page as starting point for 
the Lepido project.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc






___ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de


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



[poll] Java 5 as minimum requirement for Cocoon 2.2

2006-08-10 Thread Reinhard Poetz


On [EMAIL PROTECTED] we have started to dicuss whether we can make Java 5 becoming the 
minimum requirement for Cocoon 2.2. Note that this discussion is completly 
unrelated to Cocoon 2.1 which needs JDK 1.3.


The arguments pro Java 5 which was officially releases almost 2 years ago, are 
the support of generics, annotations, build-in JMX, simpler loop syntax, and 
many small improvements to a lot of classes.


As Cocoon 2.2 hasn't been released yet, there is no existing user base. Hence 
people are not forced to use Java 5 just because of a new patch release. We plan 
to do a release based on the 2.1.X branch within the next months, which might be 
the last one of this series.


The question now is whether making Java 5 the minimum requirement is a hurdle 
for people who plan to migrate or not.


Your opinion is appreciated!

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc






___ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de


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



Re: Problems with XInclude and Xalan

2006-08-09 Thread Reinhard Poetz

Jens Maukisch wrote:

Hi,

we've had some problems lately which seem to occur
in a combination of XInclude and some XSLT transformations
with Xalan (XSLTC and the normal mode).
One Problem for Example is that we have 'empty' element
 xmlns=foo attr=xyzfoo bar/ after a quiet normal
copy-all (xsl:template match=node()|@*) transformation
(everything is copied ok, exept some tags) or NPEs which
cause is unclear.
In every case we fist have an XInclude transformation and
then a normal XSLT-Transformation. The included XML seems
to be okay, but we have many different namespaces.

ATM I've no simple example to reproduce the behaviour,
but has anyone seen something like this before and a
hint what the problem is?


Unfortunatly not. Have you tried to use the LogTransformer to get a detailed 
report about what's actually in the SAX stream?


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc






___ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de


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



Re: [GT2006] Call for IDEAS! The 5th Cocoon GetTogether: October 2nd to 4th in Amsterdam, The Netherlands

2006-07-10 Thread Reinhard Poetz

Arje Cahn wrote:


Here's a couple of them to get you started:

- Success stories (why someone chose Cocoon, for what, what was great and what 
not?)
- Comparison of Cocoon with other web frameworks
- Why should I upgrade to 2.2?
- Some howto's / best practices for
- Configuration
- Using Spring
- Building Cocoon
- 10 Reasons to use Cocoon
- A What's new in 2.2 and how to use it track with different topics, 5 to 
10min per topic.
- What's up for Cocoon 3.0?
- The Funky Cocoon AJAX tour (with lots of samples!)
- A short (!!) introduction to OSGi (what's all that fuzz about?!)
- Practical case studies, where people show how they are using Cocoon, the high-level 
  architecture of their apps, what they're integrating Cocoon with, what makes their app 
  unique, etc. We could to 20+10 (20 minutes prez, 10 minutes questions) slots for this, 
  and have at least 4 or 6 of them during the day.



What do people think about sessions that focus on technologies that are often 
used together with Cocoon? I was thinking of


 - Maven 2
 - Spring 2
 - FOP 0.92

Maybe we can invite some of the gurus. WDOT?

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc






___ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de


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



Re: Is Cocoon the right choice?

2006-03-14 Thread Reinhard Poetz

Nils Kaiser wrote:

Reinhard Poetz schrieb:


Nils Kaiser wrote:

What you're asking for is a long-time no-no of Cocoon which we call 
dynamic pipelines. Currently there is no pipeline implementation 
that would allow this.   That's the bad news. The good news is that 
the ice is breaking :-) I understand that this doesn't help you very 
much ATM, Cocoon gets massivly refactored which will make it much 
simpler to plugin your own processor implementations. I don't know in 
which timeframes you're thinking, but if you can wait some more weeks, 
you should get some solid ground to start from to contribute to a 
dynamic pipelines implementation (which maybe doesn't need to be XML 
based ...)


Well thats very good to know! I'll follow the developments on the dev 
list. Is this cocoon 3.0 or supposed to be part of 2.2?


The next major Cocoon version hasn't got a version number yet. I was speaking of 
the code in SVN trunk ;-)


The concrete usecase in this project is that we want to apply 
XSL-Transforms based on xpath expressions. Imagine 5 XSL Transforms with 
a condition for each of them. At the moment I don't see any other 
solution than having a Transformer which builds a DOM and runs the 
conditions and the XSLs... This would also be better in term of 
performance, because I can feed the DOM directly to the transformer. The 
disadvantage is that I cannot use other cocoon components as I move the 
XSL transformations from the sitemap context to my own transformer...


The alternative would be an action building a DOM and evaluating an 
XPath. This would allow me to use other cocoon components but I am 
afraid of performance problems due to frequent DOM building and 
writing... Has someone experienced something similar? How bad do DOM 
based transformers degrade performance in general??


A DOM based implementation is far from being ideal as you have to create DOM 
documents for every stage. Cocoon 1 was DOM based and a lot of the users had 
huge memory problems.


On the dev-list some of our developers where talking about pull-pipelines. 
You're more than welcome to join [EMAIL PROTECTED] if you want to share your ideas with 
us :-)


Your second requirement sounds to be easier to be implemented based on 
the current codebase, but I'm not sure if I understand it completly. I 
assume that you were talking about a pipeline like this:


map:match pattern=aggregator/**
  map:generate type=html src=http://{1}/
  map:transform src=filter-all-links.xslt/
  map:transform type=cinclude/
  map:serialize/
/map:match

Yes thats what I'm talking about. I think we only will need to follow 
one link. The problem is more that
we'll have multiple 'exit points' at different steps of the pipeline. 
For example, we might be doing somthing after the cinclude transformer 
in your example. When the pipeline gets called by the cinclude, I have 
to take care not to run transformations twice. The is a consequence of 
the fact to have a subcall instead of a real restart.


map:match pattern=content/**
 map:generate type=html src=http://{1}/
 map:transform src=process_or_cinclude.xsl/
 map:transform type=cinclude/
 map:transform src=process_or_cinclude2.xsl/
 map:transform type=cinclude/
 map:transform src=makeitnice.xsl/
 map:serialize/
/map:match

So if the pipeline gets called by the first cinclude, I will run 
makeitnice.xsl (and process_or_include2.xsl) twice. Well I could take 
care of this by using views... is that an idea?


or adding some selectors that check if some parameter is set by the caller could 
solve your problem.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc




___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


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



Re: Is Cocoon the right choice?

2006-03-13 Thread Reinhard Poetz

Nils Kaiser wrote:

Hello!

Well, I am an happy cocoon user but I am working on a new project and not
sure if cocoon is the right choice for it. The goal of the thing is to be
able to extract information from existing web sites and to transform it and
publish it to different channels. I already have built a project with cocoon
and from the basic idea it covers pretty much with what coocoon is.

The bad thing is that we have some complex requirements for this project and
I am not sure how these can be solved using existing cocoon technology. Here
what we need to be able to do:

1) Logical decisions in the pipeline depending on pipeline content... Yes I
know this is not in the idea of the current cocoon pipeline. But seems to be
pretty important in this project. On a higher view it might be the necessity
to run transformers only if a certain condition refering to the pipeline
applies.

2) As we are working with a lot of information coming from different pages
and 'following' links to get this information, we need a more dynamical
approach to get content. Example:

User requests our URL
- GET content of page 1
- Page 1 has a link to page 2 (which is not known before)
- GET content of page 2
- Transform content of page 1 and page 2

We cant be sure how many links we have to follow and we have to do some
transformations after the request so this can't be a single component... The
problem I see is not accessing and transforming the content. It is the fact
of restarting the pipeline dynamically (depending on the content of page
1).

I am not sure how this is possible with cocoon, especially because I have
only little knowledge of flow. Is it the answer??

I also know that it is possible to adress those issues with some tricks: for
example using a special transformer followed by a CIncludeTransformer to
call the same pipeline using cocoon:// for implementing pipeline restart,
or having a set of DOM transformers which make decisions and write things to
the session to simulate conditional behavior of the pipeline.

I am very open to innovative solutions like having an own pipeline
implementation or a DOM based framework which can adress content based
decisions better.

I am just afraid we might end with a kind of monster doing some ugly things
to force cocoon to do thing it is not supposed to ;)


What you're asking for is a long-time no-no of Cocoon which we call dynamic 
pipelines. Currently there is no pipeline implementation that would allow this. 
  That's the bad news. The good news is that the ice is breaking :-) I 
understand that this doesn't help you very much ATM, Cocoon gets massivly 
refactored which will make it much simpler to plugin your own processor 
implementations. I don't know in which timeframes you're thinking, but if you 
can wait some more weeks, you should get some solid ground to start from to 
contribute to a dynamic pipelines implementation (which maybe doesn't need to be 
XML based ...)


Having said this, if you have time and the needs to work on Cocoon itself and 
want to get involved in desicions, it is the *perfekt* point of time now for 
this as nothing is carved in stone :-)


Your second requirement sounds to be easier to be implemented based on the 
current codebase, but I'm not sure if I understand it completly. I assume that 
you were talking about a pipeline like this:


map:match pattern=aggregator/**
  map:generate type=html src=http://{1}/
  map:transform src=filter-all-links.xslt/
  map:transform type=cinclude/
  map:serialize/
/map:match

The filter-all-links.xslt generates cinclude elements, that recursivly call the 
aggregator/** pipeline. You'd also have to implement the decision there if you 
want to follow a link or not. If this involved some complex desicions, you would 
have to implement some custom transformer that can make this decision as 
writting Java is for some usecases easier than writing XSLT - in particular if 
you have to call some kind of business logc. If you have to follow all links (= 
no decision), you will have to make sure that you don't create an infinite loop 
but I guess you have already thought of this ;-)


One final thought: I don't know where all those pages that you want to aggregate 
are located but you could run into some serious performance problems. It would 
be a good idea to think of caching right from the beginning.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc






___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


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



Re: [2.2] Problems with JMX Support and Tomcat

2006-01-02 Thread Reinhard Poetz

Sumit wrote:

I'm trying to get the latest 2.2 running in a standard tomcat 5.5.12

With the default webapp, the following class can't be found:

org.mortbay.log.LogFactory

So it seems that the jetty-jmx-5.1.8.jar does not contain all required

classes. Copying also jetty-5.1.8.jar into WEB-INF/lib of course solves

this problem.


The problem has already been raised on cocoon-dev. AFAIU some developers are 
looking for solutions that avoid adding the complete jetty-5.1.8.jar.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Generating XSD documentation in Cocoon

2005-11-27 Thread Reinhard Poetz

Combinational Logic wrote:
Given a set of XSD files, is there any Cocoon source available (likely 
XSLT) that enables navigation of the XSD using a high-level hyperlinked 
view. 


No, not that I know of.

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: ServiceManager outside Cocoon

2005-11-23 Thread Reinhard Poetz

Michael Ralston wrote:
I'm developing some junit tests for some java code which is used inside 
Cocoon.


Some of the objects I need access to are loaded by the ServiceManager, I 
assume these are declared in cocoon.xconf right? Where does cocoon load these 
and what is the best way to emulate this without starting up cocoon in a 
servlet engine?


Cocoon seems to currently use the excalibur component manager, which is marked 
as deprecate. To provide the same services to my JUnit tests, should I also 
use the ECM, or can I use something like the Fortress Service Manager, if so, 
how do I get it to load the same services as cocoon?


Am I even on the right track or completely confused?


Have a look at the JUnit tests of Cocoon itself, especially at 
org.apache.cocoon.core.container.ContainerTestCase and 
org.apache.cocoon.SitemapComponentTestCase


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



[ANN] Event on webframeworks in Vienna

2005-11-16 Thread Reinhard Poetz


As member of the working group open source of the Austrian Computer Society 
I'm organizing an event on web frameworks. There will be presentations on


 * Apache Cocoon
 * Apache MyFaces
 * Apache Struts
 * Ruby on Rails

It's worth mentioning that three of four presentations will be held by project 
committers (MyFaces, Ruby on Rails and Cocoon) and we will cover the same key 
points and show the implementation of the same usecase in all four presentations 
so that people get the chance of comparing the technologies.


It will take place on Nov 29th in Vienna. If you're interested, find further
information and how you can register at http://www.poetz.cc/weblog/8

P.S. My website and my blog is up and running again. I hope the Cocoon version 
that I used this time is more stable than the last one ;-)


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach

{Software Engineering, Open Source, Web Applications, Apache Cocoon}
   web(log): http://www.poetz.cc



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



Re: Request parameter in JXTemplate

2005-10-19 Thread Reinhard Poetz

Derek Hohls wrote:

This should be simple, but I am struggling:
 
I try to pass:
 
matchname?sort=foo
 
to a generated page:
 
  jx:set name=field${cocoon.request.getParameter('sort')}/jx:set

 temp${field}/temp
 
but simply get an empty tag for temp.
 
More... I have this logic
 
   jx:choose

 jx:when test=${field != ''}DO Ajx:when
jx:otherwiseDO B/jx:otherwise
   /jx:choose
 
and this always shows up as DO A ??
 
I have also tried )without success):

${cocoon.request.get('sort')}
 
What is the correct syntax and why does the jx:choose fail?


Have you tried ${request.getParameter('sort')}?

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Initialize Session Context Info

2005-10-18 Thread Reinhard Poetz

Merico Raffaele wrote:

Dear community

I am looking for a way to initialize some session context information when
the session is created. Which is the best way to initialize things at the
session creation status? Is there a central point that can be extended? 


Many thank in advance ... Raffaele


You need to implement a session listener, see 
http://servlets.com/soapbox/servlet23.html for detailed information.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Writing my own generator.

2005-10-18 Thread Reinhard Poetz

Aurélien DEHAY wrote:

Aurélien DEHAY a écrit :



ok, the dispose() comes from interface Disposable() from avalon 
framework then?



I think I'd rather ask the differences between dispose() and recycle() 
method...


Rgds.


see http://excalibur.apache.org/framework/lifecycle.html

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Public API for keeping a continuation alive?

2005-10-18 Thread Reinhard Poetz

Kris Schneider wrote:

Here's the usage scenario: We want a client-side timer to display a
warning when a user's session is about to expire. This is especially
important for forms that have unsaved data. Obviously, it's easy
enough to send an arbitrary request to the app to keep the HTTP
session alive, but how can the same effect be accomplished for a
continuation? Assuming we have the continuation's id, is there any
form of a public API available to ping the continuation so that it
doesn't expire? 


No


If it's of any consequence, we have configured the
continuations manager to use session-bound continuations.

Thanks for any info.


Binding the continuations has the benefit of getting them invalidated 
automatically when the session expires. If the continuation expires before the 
session expires, it will be removed at this point (and doesn't wait for the 
session to become invalid).


Several weeks ago I refactored the ContinuationsManagerImpl so that it is easily 
extensible and you can use your own expiration strategies by simply overriding 
the expireContinuations method. Over the next weeks I will work on them - 
maybe this is helpful for you too.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Public API for keeping a continuation alive?

2005-10-18 Thread Reinhard Poetz

Kris Schneider wrote:

Reinhard,



Several weeks ago I refactored the ContinuationsManagerImpl so that it is easily
extensible and you can use your own expiration strategies by simply overriding
the expireContinuations method. Over the next weeks I will work on them -
maybe this is helpful for you too.



Any idea if those changes are compatible with 2.1.7? Because of some
concurrency issues with 2.1.7's ContinuationsManagerImpl (I haven't
submitted the bug yet), I'm already using a custom version. If your
changes will work with 2.1.7, I might as well use that as a base
instead.


I had to change the visibility of some methods from private to protected and 
I also split up one method into smaller ones that can be overriden too.

My changes will be part of the upcoming 2.1.8 release.

If you want to get your bugfix included into 2.1.8 you should provide the patch 
very soon so that the chance is high(er) that it is applied in time. Of course 
we have to verify in some way that the patch doesn't make things worse which 
could be a problem as code freeze starts on Friday 21st. In every case this 
needs to be discussed on cocoon-dev.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Public API for keeping a continuation alive?

2005-10-18 Thread Reinhard Poetz

Kris Schneider wrote:

On 10/18/05, Reinhard Poetz [EMAIL PROTECTED] wrote:


Kris Schneider wrote:


Reinhard,



Several weeks ago I refactored the ContinuationsManagerImpl so that it is easily
extensible and you can use your own expiration strategies by simply overriding
the expireContinuations method. Over the next weeks I will work on them -
maybe this is helpful for you too.



Any idea if those changes are compatible with 2.1.7? Because of some
concurrency issues with 2.1.7's ContinuationsManagerImpl (I haven't
submitted the bug yet), I'm already using a custom version. If your
changes will work with 2.1.7, I might as well use that as a base
instead.


I had to change the visibility of some methods from private to protected and
I also split up one method into smaller ones that can be overriden too.
My changes will be part of the upcoming 2.1.8 release.

If you want to get your bugfix included into 2.1.8 you should provide the patch
very soon so that the chance is high(er) that it is applied in time. Of course
we have to verify in some way that the patch doesn't make things worse which
could be a problem as code freeze starts on Friday 21st. In every case this
needs to be discussed on cocoon-dev.



I probably need to wait on posting a fix since I don't think I've
addressed all the issues. Is the plan to release 2.1.8 from the trunk
or the BRANCH_2_1_X? It looks like your version (rev. 293111) is in
the trunk but there's a newer version (rev. 312605) in the branch.
Any suggestions on which one to take? Thanks.


Cocoon 2.1.8 will be released from BRANCH_2_1_X. The version in trunk is 
slightly different as the instrumentation code has been removed, otherwise it 
should be the same.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Writing my own generator.

2005-10-17 Thread Reinhard Poetz

Aurélien DEHAY wrote:

Hello all.

I'm currently writing a generator. I'm a bit mess up about dispose() 
recycle(), Serviceable, Disposable and CacheableProcessingComponent...


What do I really need to have a cacheable and poolable generator? I've 
read the tutorial Write a Custom Generator, but the Composable and 
Disposable is not very clear: do I need to implement both dispose() and 
compose() ?


Thank you for your answer.


See http://cocoon.zones.apache.org/daisy/documentation/writing/664.html


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Is Flow suitable for high throughput apps?

2005-10-10 Thread Reinhard Poetz

Mark Lundquist wrote:


Hi David,

On Oct 10, 2005, at 4:42 PM, David Legg wrote:

I think flow is fantastic, but I wonder if users would still be 
recommended to use custom actions and business objects instead of flow 
when dealing with high-traffic, non-stateful web pages?  The idea of 
all those continuations being maintained by the server for a 
high-volume page makes me shudder.



Remember, a continuation is only created when you ask for one.  
Typically, that means when you call Form'showForm() or 
cocoon.sendPageAndWait() (which is called from (Form'showForm()).  
(That's using flowscript as an example... not sure how it looks in 
javaflow, but it'd be the same idea).


If you just invoke a flow that ends with (in flowscript) 
cocoon.sendPage, no continuation is created.


If you are using continuations, then it's for a stateful interaction, 
but then you'd have no more concern about scalability than you would 
doing it any other server-side way using a traditional 
(non-continuation-oriented) framework, e.g. using session variables...


But we aware that all local variables in a flow function are created for all 
calls:

var x = Packages.myBusinessObject();

function y() {

  var z = Packages.myOtherBusinessObject();

}

If a single user (= session) calls y 5 times, you get one myBusinessObject and 
5 myOtherBusinessObject objects.


Also note, that myBusinessObject can be garbage collected when all continuations 
 expire, the myOtherBusinessObject instances expire when the last continuation 
of  the related continuations tree expires.


A continuation tree consists of all contunations that are created after function 
y is called.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Multi channel Publishing using Open Office and Cocoon

2005-09-21 Thread Reinhard Poetz

Robinson, Michael (UK - London) wrote:



Hello

We are currently investigate a way of achieving multi channel publishing 
using Open Office’s native xml file format (Open Document or sxw) as our 
initial file format and performing transformations using Cocoon and the 
xslt files that come with Open Office. I’ve seen a number of articles 
around that talk about achieving this and few work around type solutions 
but I haven’t seen any clean solutions or suggests.


 From what I can see the best solution would be a Cocoon generator that 
takes an Open Office file and spits out appropriate SAX events to be 
transformed by the xslt’s that come with Open Office.


Has anyone done or seen anything thing like this and would be able to 
help or point me in the right direction?


You might also want to look at Apache Forrest (http://forrest.apache.org). It 
has an OpenOffice output plugin that will help you to read and transform OO files.


--
Reinhard

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



Re: Memory profiling cocoon

2005-09-07 Thread Reinhard Poetz

Antony Grinyer wrote:

Hi,
 
Has anyone successfully integrated a Java memory profiler (such as 
JProfiler or YourKit) with Cocoon? I'd like to test the memory usage of 
a Cocoon transformer that is a Java class, but I'm not sure how I can 
get the a Java profiler to profile Cocoon transformers?


Yes. I successfully use Yourkit with Cocoon. See :doYourkitProfile in 
http://svn.apache.org/repos/asf/cocoon/trunk/cocoon.bat to find out how to start 
Jetty. Of course this requires a properly installed Yourkit (IIRC it requires 
some native library in the system path).


With this setting you can the JVM access remotly at port 1.

Hope this helps.

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Calling a block of transformations

2005-08-25 Thread Reinhard Poetz

Stewart, Gary wrote:

Hi there,

Another newbie question I'm afraid. There are a set of transformers that I commonly call from a lot of pipelines and that I'd like to be able to possibly change at a later date. 


You're looking for map:resource. See 
http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html#The+%3Cmap%3Aresources%3E 
 and the samples.


You can combine a group of sitemap components within a resource and call them 
from other pipelines by map:call resource=[name]/.
Please note that this will be deprecated in Cocoon 2.2 in favour of the concept 
of virtual sitemap components.


Also note that there is no inheritance of resources which means that they are 
only available within the sitemap where they are declared. This is one issue 
that virtual sitemap components will fix.



--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Calling a block of transformations

2005-08-25 Thread Reinhard Poetz

JD Daniels wrote:
I depend heavily on resources... 


as most of us that want to avoid code duplication do ;-)
of course resources will go through an appropriate deprecation cycle

Is there any form of virtual sitemap 
components in the 2.1.x tree?


no, only in trunk (they should work there)

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: CForms: Validation based on values from several widgets

2005-06-29 Thread Reinhard Poetz

Armaz Mellati wrote:

Hi



What is the best way of validating based on the values of several widgets in a 
CForm ? I mean somthing like this:

If (model.foo == 'something')  (model.bar == null) {
return false;
}else{
return true ;
}


Where should I do or can I do such a validation ? 


Any idea ??


Have a look at the form definition of form1 of the samples. There you'll find 
a custom Javascript validator assigned to the form 
(http://svn.apache.org/repos/asf/cocoon/blocks/forms/trunk/samples/forms/form1.xml)


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: [CForms] Repeater with links

2005-06-28 Thread Reinhard Poetz

Ugo Cei wrote:

Il giorno 27/giu/05, alle 16:09, Reinhard Poetz ha scritto:


You have to use the cforms macro library to get the id:

...
jx:import 
uri=resource://org/apache/cocoon/forms/generation/jx-macros.xml/

...



In this case, I should not be using the FormsTransformer, right? Are 
there any limitations/caveats with the macros WRT the FormsTransformer?


jx-macro is even more advanced than the FormsTransformer (Ajax, tree widget) but 
might have performance problems (I haven't tested it) caused by jx:set. This 
problem was eliminated in trunk 
(http://marc.theaimsgroup.com/?l=xml-cocoon-cvsm=111641612705437w=2). As I 
don't use jx-macro with a 2.1 installation  my itch to solve the problem in 2.1 
wasn't strong enough.


According to _my measurments_, in trunk the FormsTransformer is only about 0 - 4 
% faster than jx-macro which isn't a reason to use the transformer because of 
its better performance any more.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: [CForms] Repeater with links

2005-06-27 Thread Reinhard Poetz

Ugo Cei wrote:
Here's a simple problem for which I cannot seem to find a simple 
solution (or any solution at all). I hope someone here can help me.


I have a Collection of Java beans. Each bean has a couple of properties: 
id (Integer) and name (String).


I also have a form with a repeater:

fd:repeater id=current
  fd:widgets
fd:output name=id id=id
  fd:datatype base=integer/
/fd:output
fd:output id=name
  fd:labelName/fd:label
  fd:datatype base=string/
/fd:output
fd:booleanfield id=select
  fd:labelSelect/fd:label
/fd:booleanfield
  /fd:widgets
/fd:repeater

The repeater is bound to the collection:

  fb:repeater id=current parent-path=. row-path=current
fb:identity
  fb:value id=id path=@id direction=load/
/fb:identity
fb:on-bind
  fb:value id=name path=name direction=load/
/fb:on-bind
  /fb:repeater

As you can see, data is mostly read-only. I am just interested in the 
value of the select field for selecting some rows to be further 
processed.


I also created a template for displaying the repeater as a two-column 
table. Column 1 is for the select widget, whereas column 2 shoud 
display the name property. That was easy.


The next requirement is for each name to be a link to an URL which 
depends on the value of the corresponding id. Something like:


ft:repeater-widget id=current
  tr
tdft:widget id=select//td
td
  a href=/base/[INSERT-ID-HERE]ft:widget id=name//a
/td
  /tr
/ft:repeater-widget

Now the question is: what would be the easiest way to put the id 
property of the bean bound to the current row in place of the 
[INSERT-ID-HERE] string?


You have to use the cforms macro library to get the id:

...
jx:import uri=resource://org/apache/cocoon/forms/generation/jx-macros.xml/
...

ft:repeater-widget id=current
  tr
tdft:widget id=select//td
td
  a 
href=/base/${repeater.getRow(repeaterLoop.index).lookupWidget('id').value

  ft:widget id=name//a
/td
  /tr
/ft:repeater-widget

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: [GT2005] News, vote and more news

2005-06-17 Thread Reinhard Poetz

Andrew Savory wrote:

Hi,

On 17 Jun 2005, at 15:41, Steven Noels wrote:

Now, about the vote: we have rooms reserved for the entire first week 
of October, but need to decide on the first or last part of the week. 
So please indicate your preference (and reply to the dev list for 
easier counting):


Yes, I'm thinking of attending the Cocoon GetTogether 2005 in 
Amsterdam, preferably on


  [+1]  3/4/5 October (Mon-Wed)
  [ ]  5/6/7 October (Wed-Fri)



It would help in deciding if we had an indication of start / end times 
and social events, etc.


In previous years, there's been a great chance to grab beers with people 
the night before, which effectively means arriving on a Sunday or a 
Tuesday. If that's the case this year too, then I'm in favour of 3/4/5 ...


same here

--
Reinhard Ptz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: i18n euro symbol location

2005-06-16 Thread Reinhard Poetz

Rui Alberto wrote:

Hi,

Is that possible switch euro symbol from the right side of the value to
the left?!
Ex: formating 3 euros using i18n returns 3, but I need to present the
amount in the format 3!

I've created a test class using java.lang.NumberFormat to format a
value, and in fact the returned formated value id 3!! There is no fixed
rule where to place de  symbol, but the most common adopted place in
the euro community is on the left side. 


I know that is possible to use currency-no-unit and place the symbol
myself, but doing that implies doing that in many places! :|

Thanks all all,


I think it depends on the used locale. If e.g. the Austrian locale (de_at) is 
used, the  symbol comes first.


--
Reinhard Ptz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: JX template syntax

2005-06-13 Thread Reinhard Poetz

Rui Alberto wrote:

Hi all,
this is probably a basic question, but I can't find out how to solve my
problem.

Is that possible do something like :
jx:set var=xxx value=${Packages.java.util.Date}/

input name=teste type=hidden value=#{$xxx.getTime()}


I don't know if you can create new objects in jxtemplate (I don't think so.). 
Whenever I had the need for it I wrote a static initializer.


For your problem you can write

  input name=teste type=hidden 
value=${Packages.java.lang.System.currentTimeMillis()}/


or you write a static helper method that returns a Date object.

Anyway, be aware that this isn't good design to create objects in the view layer 
- it's better to push them to it.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: AW: AW: WG: CFORMS validation unexplained behavior - call for help!

2005-06-08 Thread Reinhard Poetz

Messing, Elad wrote:

Sorry - my mistake. Here goes :

*
URL XXX.form - resolves in sitemap to :

map:match pattern=*.form
  !-- CForm (makred by the .form ending) redirected to a flow script 
function with the same name --
  map:call function=handleForm{1}/
/map:match

*
Flowscript :

function handleFormXXX() {
var data = {restTypeList: getRestTypes()};

var form = new Form(forms/xxx_main_search.xml);

form.showForm(/template/forms/xxx_main_search.xhtml, data);


var model = form.getModel();
   
var results = new Object();

results.model = getModelSearchResults(model.name, model.type);
cocoon.sendPage(/template/dynamic/xxx_results.jx, { results: results });
   
}

*
template/forms/xxx_main_search.xhtml in the sitemap again :

map:match pattern=forms/**
  !-- This will handle CForms. It is called after a flowscript, and delegate 
to a xhtml file, with ft:form-template tag to hold the form. Then it applies the 
form styling--
  map:generate src=content/{1}/
  map:transform type=forms/
  map:transform src=stylesheets/system/forms-samples-styling.xsl/
  map:serialize type=xhtml/
/map:match
*

Hope this is all the info you need. If something is missing - let me know and I 
will add it quickly.

Thank you again for your patience!



Your flowscript looks good to me. Also the behaviour that hitting the 
back-button leads to a page showing the errors and the correct values is caused 
by the nature of web browsers as the page before was showing the errors. Have a 
look at the logs and you'll see that there hasn't been any server request. You 
can watch the same effect at samples/blocks/forms/form1.flow.


If you want to change this I'd look at response headers related to caching and 
maybe you should have a look at 
http://www.theserverside.com/articles/article.tss?l=RedirectAfterPost. Note, 
AFAIK this hasn't been implemented with Flowscript yet, but it should be feasible.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: CFORMS validation unexplained behavior - call for help!

2005-06-08 Thread Reinhard Poetz

Messing, Elad wrote:

Thank you Reinhard, for you answer !
I understand, so this is typical Back behavior. It makes sense.

However - Still the 3rd issue I mentioned occurs:  

 And the third issue - When I am not using the Back button, 
 but instead using the original link to the form page, I get other 
 results:
 - I can see the form in the state it was after I entered a too-short 
 string in the text field !! This is after I have already changed the 
 data to valid, submitted, got my results, and return to the form page 
 using its link 1 minute after.. I even get the results opening a new 
 browser window, in a different process. Only restart to the web 
 server removes it. 



Is this cache as well ? This time - server cache ? Or maybe something else ? 
How can I check it ?


Have a look at the log files or add some print() statements to your flowscript. 
I guess it's a caching problem too as you initialize the form correctly in a 
local variable.



(May you refrain from sending your mails as HTML mails. AFAIK there are some 
people that have problems with them.


Additionally my mail client has problems to  show your mails at the correct 
place in the thread tree which is very unconvenient. This can have two reasons: 
Either you don't answer directly and always create new mails or your mail client 
suppresses the according information in the mail header. Please try to change 
this. Thanks!)



--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Problems with Continuations in Flowscript

2005-06-08 Thread Reinhard Poetz

Roberto Pierpaoli wrote:

Details:

   * Cocoon 2.1.7 standalone
   * JDK 1.5.0_03
   * Windows 2000 SP4


I have made a small example to test the use of continuations, it is made 
of a simple counter that is incremented each time the user presses the 
count button, then, when the stop button is pressed, the result 
page, containing the final value of the counter, is sent.
On the basis of what I have understood about continuations, I expected 
that, pressing the BACK button of the browser, old continuations 
should be restored and local variables should be restored with them, for 
example: I press count five times, so the value is now 5 (assuming the 
initial value equal to zero), now I press the back button two times (I 
expect the value to be restored to three) and in the end I press the 
stop button ... but the result shown is still 5, and not 3 as expected!

What's wrong with my aproach?


The official documentation says:

/With continuations in the language, you can essentially store the 
continuation of |sendPageAndWait()| (think of all the stack trace, and 
the program counter), put it in a global hash table associated with an 
id. The id is then encoded in the |response.xml| page as an URL. When 
the user clicks on that URL, on the server side the associated 
continuation is resumed. Resuming the processing happens as if nothing 
was stopped, you get all the stack trace back, and all the local 
variables.//
So instead of using beans to store things in session, you use normal 
variables in a program. Since each user has its own version of the 
program, all the local variables in the program are separate between users.
With this approach clicking the Back button in the browser is no longer 
a hassle to deal with for you as a server-side programmer. They will 
simply refer to past continuations objects, which have their own state 
of the local variables./


/Since continuations are objects, you can also store them in a database, 
for really long-lived session, just like you do with session beans./



Any help or suggestion is very appriciated!



What you explained is correct, the docs are not very clear about this. All 
continuations of *one continuations tree*  share all local variables. Global 
variables are shared by all continuation trees.


If you want to bahaviour that a variable is bound to a continuation (and not the 
tree it belongs to) you have to create a PageLocal variable:


var pageLocal = cocoon.createPageLocal();
pageLocal.counter = ...

HTH

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: xsltc and output escaping

2005-06-08 Thread Reinhard Poetz

Reinhard Haller wrote:

Hi,

in a complex pipeline I've problems with the 
xsltc transformer. At random places text nodes

are copied as if disable-output-escaping is set
to yes.

Copying links with ...?id=xxtype=yy isn't almost
impossible under such conditions.

After changing the default transformer to xalan
all works, but a lot slower.

What's wrong?


Could be a Xalan bug. Could you try to run your transformation outside of Cocoon 
using XSLTC? Then you know who (Cocoon or the XSLTC team) you can nag to get the 
bug solved.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Antw: Re: xsltc and output escaping

2005-06-08 Thread Reinhard Poetz

Reinhard Haller wrote:


My own XSL-files are working with MSXML/XMLSpy and XALAN outside of
Cocoon.
It works also with XALAN inside Cocoon.


Can you try it *outside* of Cocoon using XSLTC either? (Without this isolated 
test it is difficult to find out whether it is an XSLTC bug or a Cocoon bug.)


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: Problems with Continuations in Flowscript

2005-06-08 Thread Reinhard Poetz

Roberto Pierpaoli wrote:
Thank you so much!! I have spent hours on this issue, now I'm finally 
able to keep the execution state, thank you!


glad that I could help but take care of your memory consumption

--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



Re: xsltc and output escaping

2005-06-08 Thread Reinhard Poetz

Reinhard Haller wrote:

[EMAIL PROTECTED] 08.06.2005 17:03 


Can you try it *outside* of Cocoon using XSLTC either? (Without this


isolated 


test it is difficult to find out whether it is an XSLTC bug or a


Cocoon bug.)

It works as expected (XSLTC bundled with XALAN 2.6.0). As stated
earlier
the problems came with the increasing pipeline complexity.

Outside of Cocoon I cannot test the effect of multiple cincludes, so
how to
proceed to track down the error?



Add a view right before the XSLTC transformer and call the pipeline using this 
view.  Save the view result as file and use it for an isolated testcase outside 
of Cocoon.


--
Reinhard Pötz   Independent Consultant, Trainer  (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc


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



  1   2   3   >