You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Clive Hackney <cl...@accidentgroup.com> on 2001/12/17 11:50:00 UTC
Problems generating PDF files using request parameters
> Hi,
>
> Am having a problem getting the request parameters (submitted from a form)
> into a PDF document.
>
> The code I am using is as follows. In the site map ( the one used for the
> demos ) I have added the following code
> <!-- generates the form -->
> <map:match pattern="subpage">
> <map:generate src="clives/docs/subpage.xml"/>
> <map:transform
> src="clives/stylesheets/simple-page2html.xsl"/>
> <map:serialize/>
> </map:match>
> <!-- generates the PDF document -->
> <map:match pattern="endpage">
> <map:generate type="serverpages" src="clives/docs/endpage.xml"/>
> <map:transform src="clives/stylesheets/simple-page2fo.xsl">
> <map:parameter name="use-request-parameters" value="true"/>
> </map:transform>
> <map:serialize type="fo2pdf"/>
>
> </map:match>
>
> When the PDF document is generated the parameter values are missing, the
> style sheets are copies on ones used in the sample pages supplied. The
> contents of endpage.xml are as follows.
>
> <xsp:page
> language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xsp-formval="http://apache.org/xsp/form-validator/2.0"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0"
> >
> <page>
> <xsp:logic>
> String msg = request.getParameter("paraText");
> </xsp:logic>
> <para><xsp:expr>msg</xsp:expr></para>
> <title>THIS is the end my friend</title>
> <para><xsp-request:get-parameter name="paraText"
> default="bugger"/></para>
> <para><xsp-request:get-parameter name="inputText" default="fred"
> /></para>
> </page>
> </xsp:page>
>
> The parameter names are correct! , when I change the style sheet to
> simple-page2html and remove the type from the serialize tag, it generates
> the page fine in html with all the parameters in place.
>
> Any ideas? is this a bug, or am I missing something when trying to convert
> to pdf. It appears to be stripping of the request parameters.
>
FYI I am using Cocoon 2 running in tomcat 3.2.2 on a windows 2000 platform.
> Cheers
>
> Clive
>
> Software Developer
> The Accident Group
> 55 King Street, Manchester, M2 4LQ
> Tel 0161 778 6199
> www.accidentgroup.com
> ---------------------------------------------------------
> Confidentiality Notice: This message is intended only for the addressee
> and may contain information that is confidential or privileged.
> Unauthorised use is strictly prohibited and may be unlawful. If you are
> not the addressee, you should not read, copy, disclose or otherwise use
> this message, except for the purpose of delivery to the addressee. Any
> opinions or advice contained in this message are subject to The Accident
> Group standard terms and conditions.
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>