cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holger Dewes" <>
Subject portal-fw: coplet configuration with XSP
Date Mon, 30 Jun 2003 11:09:04 GMT
Dear all,

I'm currently playing around with the portal framework (2.1 M2, jdk
1.3.1, resin 2.0.4). I'm trying to create a configurable coplet. Because
the basis for the configuration is dynamic, I want the configuration to
be created by an XSP instead of a static XML. However, I get really
weird results. Most often it does not work, because I get
NullPointerExceptions (from different places, e.g.
org.apache.cocoon.environment.AbstractEnvironment, line 511), or the
portal simply refuses to show the content of the coplet and keeps
showing the configuration (but no errors in the logs). But what's really
frustrating: sometimes it works. I have been trying for the last couple
of hours to create an easy example for this list that never works, but
it seems impossible.

Anyway, this shows basically what I'm trying to do:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page language="java" xmlns:xsp=""
    <session:form name="coplettest" method="POST">
        <session:getxml context="portal" path="/configuration/uri"/>
          for(int i=1; i &lt; 4; i++)
              <session:inputxml context="portal" type="text">
      <input type="submit" value="Change"/>

This is the pipeline:

<map:generate type="serverpages"
<map:transform type="session"/>
<map:transform src="styles/config2html.xsl"/>
<map:serialize type="xml"/>

This didn't work half an hour ago, now it works... right, I'm just back
from lunch, now it doesn't work anymore.

I tried it with Cocoon 2.0.4 and ran into the same problems (no
NullPointerException yet, but also the refusal to show the content after
doing the configuration).

Any ideas? Are there any known problems with configuring coplets via
XSP? To me, this smells like a race condition, but I have no idea how to
pinpoint it.


Holger Dewes

View raw message