cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Chang <schav_2...@yahoo.com>
Subject xsp request parameters, util:taglibs, and XML responses!?
Date Sun, 24 Dec 2000 07:59:03 GMT
Hello,

I am relatively new to Cocoon and XSP but have done
okay so far on understanding most of its syntax and
usage. Am currently developing XSP pages, which
utilize 3rd party taglib calls, then applying XSL
stylesheets to them. Anyways, I am using: Cocoon 1.8
on Tomcat 3.2.1, with the latest Apache Web Server on
Windows 2000.

My problem is happening while I am developing XML
pages which utilize another party's taglib tags, which
take child element values as input parameters. When
these tags are called, the response they return are
XML tags, not straight up strings. For the response to
be treated as XML tags instead of strings (so my
corresponding XSL stylesheet can process them), I have
surrounded the tag calls with the <util:include-expr>,
<util:expr> tag set from the Util taglib (based on the
tips in the Cocoon FAQ):

...
<p>
<util:include-expr><util:expr>
<taglib1:MyFirstTagRequest>
<firstParameter>John</firstParameter>
<secondParameter>Doe</firstParameter>
</taglib1:MyFirstTagRequest>
</util:expr></util:include-expr>
</p>
...

This works fine and dandy. When
<taglib1:MyFirstTagRequest> is called and passed
certain parameters, an XML response is returned when
the XSP processor runs through it, and the resulting
XML file (before the XSL Transformations are applied)
looks like:
...
<p>
<responseTag>
You passed "John" and "Doe" as input!
</responseTag>
</p>
...

My XSL stylesheet can then do some <xsl:template
match="responseTag"> processing and all is fine.

The problem comes up when I want to pass in parameters
during the tag call using values taken from my
HTTPRequest object, such as:

...
<page>
<xsp:logic>
String x = request.getParameter("param1");
String y = request.getParameter("param2");
</xsp:logic>
...
<p>
<util:include-expr>
<util:expr>
<taglib1:MyFirstTagRequest>
<firstParameter><xsp:expr>x</xsp:expr></firstParameter>
<secondParameter><xsp:expr>y</xsp:expr></secondParameter>
</taglib1:MyFirstTagRequest>
</util:expr>
</util:include-expr>
</p>
...
</page>
</xsp:page>

The values "x" and "y" are being passed into the tag
call; NOT the values OF variables x and y. I'm not
even sure if this has to do with the request
parameter; perhaps it is just with my usage of
evaluating variables in general. I can clearly print
out these values whenever I use <xsp:expr>x</xsp:expr>
anywhere else within the document. Just when I use
them between <util:include-expr> and <util:expr>,
their values are not being evaluated correctly. I've
tried trying different tag combos but have not been
able to get the desired result...

Can anyone offer any insight into this and suggest
what tags I should or shouldn't be using in this
situation? Again, I'm jsut trying to pass in the
VALUES of my variables in as elements of the
taglibrary tag call.

Thanks in advance!


__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Mime
View raw message