cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clive Hackney <clive.hack...@accidentgroup.com>
Subject Problem generating pdf
Date Wed, 19 Dec 2001 10:00:06 GMT
Hi 

I posted this first to the users group, but go no response, was hoping to
get some help!!

I am trying to generate pdf file using fo , the problem I am having is that
the request parameter are getting nulled. The page I am using is below, I
have placed some System.outs to try to find out what is going on. Below is
the code for the xml page I am trying to translate.

<xsp:page
   language="java"
   xmlns:xsp="http://apache.org/xsp"
   xmlns:xsp-request="http://apache.org/xsp/request/2.0"
>
<page>
	<xsp:logic>
		int i = 0; 
	//	String msg = request.getParameter("paraText");
		System.out.println("Starting .... ");
		System.out.println("paratext = " +
request.getParameter("paraText"));
		System.out.println("inputtext = " +
request.getParameter("inputText"));
		System.out.println("fredtext = " +
request.getParameter("fred"));
		i++;
		System.out.println("i = " + i);
	</xsp:logic>

	<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>
	<para><xsp-request:get-parameter name="fred" default="no fred"
/></para>
	<xsp:logic>
		System.out.println("Finished");
	</xsp:logic>
</page>
</xsp:page>

The pipeline I placed in the sitemap ( I am using the examples one!)
	<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>

Now if I run this I get the following output in the tomcat window from the
system outs.
Starting ....
paratext = this text is from a textbox
inputtext = I inputed this text
fredtext = null
i = 1
Finished
Starting ....
paratext = null
inputtext = null
fredtext = null
i = 1
Finished
Starting ....
paratext = null
inputtext = null
fredtext = null
i = 1
Finished

It appears to run the translation 3 times, It ALWAYS does this, so the page
actually sent to the browser is the 3rd one with blank parameters.

However when I use a html translation instead, it works fine. i.e. I use the
following sitemap.

	<map:match pattern="endpage">
		<map:generate type="serverpages"
src="clives/docs/endpage.xml" />
		<map:transform src="clives/stylesheets/simple-page2html.xsl"
>
				<map:parameter name="use-request-parameters"
value="true"/>
      	</map:transform>
		<map:serialize type="html"/>
	</map:match>
 I get the following output in tomcat
Starting ....
paratext = this text is from a textbox
inputtext = I inputed this text
fredtext = null
i = 1
Finished

Is this a Bug, or am I missing something in the configuration. A response
would be appreciated, even an I don't know. 

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.



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message