You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "e.chan" <e....@stud.umist.ac.uk> on 2002/05/23 14:30:29 UTC

how to embed java logic into xml page?

Dear all,
I am a newbie to cocoon2. I am using cocoon2, with jdk1.3.1, tomcat4.0
and running on a winXP platform (I am sure most of you disapprove of
this! >:) I am making a prototype using cocoon to connect to a jabber
server (like instant messaging, sort of like JMS) and send messages to
jabber clients. 
I was advised to not separate the logic from the main XML code because
the environment which I am using causes a lot of problems when I try to
reference logic sheets in cocoon and it is going to take a while for me
to work out this problem. 
The main thing is to get it to work and refactor it later. Since I am
running out of time for implementation, I want to embed the logic into
the XML file rather than having it in a separate logic sheet. Thus I
don't need to alter the cocoon.xconf and sitemap.

The logic I am using is java and I have a no. of libraries I need to
include but I am not sure how to declare these in the xml/xsp  page. I
have checked out the examples that came with cocoon and the ones with
embedded logic are quite simply "hello world" or some control loop and
do not have a number of different methods and libraries.

I have searched the mailing list archives to see if there has been a
question and answer already in existence however, I didn't come across
any. 
So far, the mailing list concerns people who split the logic into a
logic sheet.

Please can someone tell me how embed the java logic with a number of
different methods, and imported libraries into an XSP? Perhaps you can
send me an example XSP file with the java logic embedded which has
libraries and so on (any example is fine, I can follow the structure).
Or are there any other suggestions please let me know.
 

Any help would be greatly appreciated. 
Kindest regards, 
liz

Elizabeth Chan
Masters of Enterprise
UMIST & Univ. of Manchester
+ 44 (0) 777 1627374
"I am extraordinarily patient, provided I get my own way in the end."
Margaret Thatcher





Elizabeth Chan
Masters of Enterprise
UMIST & Univ. of Manchester
+ 44 (0) 777 1627374
"I am extraordinarily patient, provided I get my own way in the end."
Margaret Thatcher