cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C Bram Dit Saint Amand <scs2c...@comp.leeds.ac.uk>
Subject <xsl:include> a custom class
Date Thu, 03 Jul 2003 19:12:00 GMT
My former problem being solved (thank you Christian Haul), I tested
something else today.
I tried to use my own class called 'DbApi' in a logicsheet.


I inserted this code (1):
----
<xsp:structure>
    <xsp:include>DbApi</xsp:include>
</xsp:structure>
<!-- DbApi is the name of the class, the file is 'DbApi.java'-->
----
into the xsp file (generator).

I added to the CLASSPATH the directory where 'DbApi.java' and
'DbApi.class' are.

As for the logicsheet, inside a <xsp:logic> tag, I tried the following:
----
DbApi db_api = new DbApi();

DbApi.newInstance().connect("", "");
//'connect(String, String)' is a method from the DbApi class
----

Both don't work (I got the infamous 'Cocoon Confusion' error message). I
have no clue if the <xsp:include> correctly included the file or not.

I tried to insert the code (1) into the logicsheet instead, but it didn't
solve the problem.


The Questions:
--------------
1) Is it possible to include custom classes with <xsp:include>, or can we
only include existing java classes this way?
2) If we really CAN include custom classes this way, what is wrong in my
code / how to do it?


Thanks in advance.


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


Mime
View raw message