cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Markus <t.mar...@proventis.net>
Subject Re: Adding my Java code to flowscript
Date Mon, 24 Jan 2011 06:38:27 GMT
Hi,

dont use the default package. Place your class in a package (fi 
test.Test) and it should work.

regards
Thomas


Am 23.01.2011 01:25, schrieb Des Magner:
> Hi
>
> I am trying to add some custom code to be called from my flowscript 
> but with no success. I followed the instructions in the user 
> documentation to the letter 
> (http://cocoon.apache.org/2.1/userdocs/flow/java.html). I have added 
> my source directory entry to the component-instance in the format 
> "file:/path/to/my/source" but it doesn't seem to want to pick up the 
> code. Say I have the following code in my flowscript:
>
> var resource = new Packages.Test();
>
> with the file Test.java placed in my source dir as specified above, I 
> consistently get the following error:
>
> org.mozilla.javascript.EvaluatorException: "file:///....js", line ..: 
> Not a Java class: [JavaPackage Test]
>
> I can get around it by placing the compiled class in the 
> cocoon/WEB-INF/classes directory but this is not a very elegant solution.
>
> Any help would be greatly appreciated.
> Thanks
> Des
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


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


Mime
View raw message