cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <>
Subject Re: Problems using Java code in Flow Scripts
Date Sat, 06 Sep 2003 07:16:56 GMT
On Fri, 2003-09-05 at 18:40, Stephan Niedermeier wrote:
> Hello,
> at first I would say that the concept of Control Flow is one of the
> best concepts I have ever heard in web development. The use of Flow
> Script is very easy and fantastic. But there is one big problem for
> me: It's not possible to use the Flow Script in professional
> applications! The reason: There are many, many problems of using
> Java-Code in the Flow Script. 
> An example: Why cause the following lines a NullPointerException
> function main() {
>   importClass(;
>   user = new User();
>   user.setName("Donald Duck");
>   user.setPassword("foo");
>   user.setActive(false);
>   cocoon.sendPage("example.jxt",{"user", user});

I think you got a typo here: {"user" : user}

note the colon between "user" and user.

As the other reply suggested, always use "var" when introducing new
variables. Otherwise your variable with belong to the global scope and
will cause implicit session creation.
Bruno Dumon                   
Outerthought - Open Source, Java & XML Competence Support Center                

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

View raw message