Gerald Ernecker wrote:



Hello together,

I am using cocoon-2.1.6 and Java 1.5.0_03-b07.
I have created an own logicsheet and now want to call this logicsheet dynamically with a parameter which comes from the request. For example the request http://localhost:8888/zufall-aufruf.xml?groesse=12 should be processed within zufall-aufruf.xml and then place the dynamic call

<zufall:zahl>
           <groesse>12</groesse>
</zufall:zahl>

"zufall" is the namespace of my own logicsheet.

In some tutorials for cocoon 2.0 they always use

       <zufall:zahl>
           <groesse>
               <xsp-request:get-parameter name="groesse"/>
           </groesse>
       </zufall:zahl>

to solve this problem. The call of the logicsheet is successful but no parameter is being delivered. I heard and read about some change-overs from cocoon 2.0 to 2.1 concerning my field of problem, but nobody had a solution.
Does anyone know how to dynamically call logicsheets?

Thanks for help
Gerald

PS: In www there are a lot of tutorials concerning this kind of problem which provide code that don't run correctly.

Can you give more information about your pipeline and your xsp page?
I'm confused about whether zufall-aufruf.xml is an XSP page or something else.

One question I would ask is, does your XSP page declare the xsp-request namespace prefix on its <xsp:page> element? There are other questions that would be answered by actually seeing your xsp page.

Regards,
Lars

I have default sitemap after build-process. My pipeline includes following code

           <!-- execute the XSP pages -->
           <map:match pattern="*.xml">
               <map:generate type="xsp" src="xsp/{1}.xsp"/>
               <map:serialize type="xml"/>
           </map:match>

My zufall-aufruf.xsp looks like
   <?xml version="1.0" encoding="ISO-8859-1"?>
   <xsp:page language="java"
       xmlns:xsp="http://apache.org/xsp";
       xmlns:zufall="http://oio.de/zufall";
       xmlns:xsp-request="http://apache.org/xsp/request/2.0";>
       <seite>
<zufall:zahl><groesse><xsp-request:get-parameter name="groesse"/></groesse></zufall:zahl>
       </seite>
   </xsp:page>

The main problem is that no dynamic parameter is taken over by the logicsheet. Even
  ...
    <seite>
       <xsp:logic>
           String groesse = 11;
       </xsp:logic>
       <zufall:zahl><xsp:expr>groesse</xsp:expr></zufall:zahl>
   </seite>
...

do not work.

Thanks for help
Gerald

What you're doing looks right to me.
Further questions:
- does it work if you don't use the custom logicsheet (zufall:)?
- when it doesn't work, what is the result? Simply <zufall:zahl><groesse></groesse></zufall:zahl>?

Lars



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

Reply via email to