Re: Running Java Through Cocoon

2002-08-13 Thread Christian Haul

On 13.Aug.2002 -- 05:11 PM, [EMAIL PROTECTED] wrote:
> Hey guys,
> 
> I'm hoping you could help me out with a project I've been tasked with.
> 
> I'm gonna ask the simple question now, and go into more detail below:
> 
> How can one have a Logic Sheet helper class, that just runs a method stored
> in a new custom java class? And does anyone have an example of this.

Look at the supplied logicsheets that come with Apache Cocoon. They do
this all the time. I suggest to look at the util or request logicsheet
as they are relatively simple. For a full blown, complicated example,
look at the esql logicsheet.  

There are some bean helpers around as well, for example jpath could be
of interest.

Chris.

Please follow up summarizing your problem and which suggested solution
/ information worked for you when you consider your problem
solved. Add "SUMMARY: " to the subject line. This will make FAQ
generation and searching the list easier. In addition, it makes
helping you more fun. Thank you.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Running Java Through Cocoon

2002-08-13 Thread david . levinger

Hey guys,

I'm hoping you could help me out with a project I've been tasked with.

I'm gonna ask the simple question now, and go into more detail below:

How can one have a Logic Sheet helper class, that just runs a method stored
in a new custom java class? And does anyone have an example of this.

Something simple like a helloworld that would just type HelloWorld on the
screen, but where the code to type helloworld wasn't stored in the logic
sheet. 

Or better, the previous example modified to where I could pass my name as a
variable that the helper java class would pick up and then pass over to the
helloworld statement.

So it would say, Hello David, instead of just something hard coded in the
java code.

Anyone have any ideas/reference materials?

Thanks in advance for your help on this issue!!

david

**Begin More Detailed Explanation**

I'm trying to figure out, how to access a custom made java program through a
logic sheet/helper class type system.

Specifically something like what I describe below:

I have inside my logic sheet something that defines a "TCAdmin" instance,
and then runs that instance.

Without the lines I have in ***, and with the original example it works
just fine. But the "guts" of the java code are actually IN the logic sheet.
I want them outside the logic sheet and be able 2 call them.

  

  


  
java.util.Date
java.text.SimpleDateFormat
***TCAdmin ***
  





  


  

When I try and access this I get the following error complaining about it
not being able to access the TCAdmin Class:

description org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
simple_xsp: Line 72, column 24: class TCAdmin not found in class
org.apache.cocoon.www.spain.simple_xsp Line 73, column 35: class TCAdmin not
found in class org.apache.cocoon.www.spain.simple_xsp Line 0, column 0: 2
errors 

However, when I excecute this java class through dos using another java
class it works exactly as you would think, typing the print statement that I
have in the java class.

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>