You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Brent L Johnson <br...@bjohnson.net> on 2004/02/05 21:21:05 UTC

HTMLGenerator and Request Params

Im attempting to pass some parameters through to
the src of the HTML generator and I'm getting an
IOException.  Here is my sitemap snippet:

<map:match pattern="test.xml">
    <map:act type="request">
        <map:parameter name="parameters" value="true"/>
        <map:generate type="html"
src="http://www.somewebsite.com/someSearchUrl.cgi?param={searchParams}"/
>
        <map:transform src="styles/test.xsl"/>
        <map:serialize type="xml"/>
    </map:act>
</map:match>

I try to access this by going to
http://localhost/test.xml?searchParams=my%20param

I get an error that says "Could not get resource
http://www.somewebsite.com/someSearchUrl.cgi?param=my param"

It looks like it decodes the %20 and turns it back into a normal space
but the generator does NOT like that.  Does anyone have any suggestions
as to how I can get around this problem?  If I just hardcode my%20param
for the generator it works just fine.

Thanks,

- Brent


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


RE: HTMLGenerator and Request Params

Posted by Brent L Johnson <br...@bjohnson.net>.
The raw request parameter input module does not work.
So you can change the bug to confirmed :)  Joakim
actually patched it and it's working for me now.
I think he just added a URLEncode to the parameter
before its returned.

- Brent

> -----Original Message-----
> From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de] 
> Sent: Wednesday, February 11, 2004 4:32 PM
> To: users@cocoon.apache.org
> Subject: Re: HTMLGenerator and Request Params
> 
> 
> On 05.02.2004 21:21, Brent L Johnson wrote:
> 
> > Im attempting to pass some parameters through to
> > the src of the HTML generator and I'm getting an
> > IOException.  Here is my sitemap snippet:
> > 
> > <map:match pattern="test.xml">
> >     <map:act type="request">
> >         <map:parameter name="parameters" value="true"/>
> >         <map:generate type="html" 
> > 
> src="http://www.somewebsite.com/someSearchUrl.cgi?param={searchParams}
> > "/
> > 
> >         <map:transform src="styles/test.xsl"/>
> >         <map:serialize type="xml"/>
> >     </map:act>
> > </map:match>
> > 
> > I try to access this by going to 
> > http://localhost/test.xml?searchParams=my%20param
> > 
> > I get an error that says "Could not get resource 
> > http://www.somewebsite.com/someSearchUrl.cgi?param=my param"
> > 
> > It looks like it decodes the %20 and turns it back into a 
> normal space 
> > but the generator does NOT like that.  Does anyone have any 
> > suggestions as to how I can get around this problem?  If I just 
> > hardcode my%20param for the generator it works just fine.
> 
> The request parameters are not decoded back in the sitemap. 
> Does the raw 
> request param module work for you? See 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23283 for 
> an example. 
> Unfortunately there is another bug open, that states that it 
> might not 
> work: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25102.
> 
> Joerg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 
> 


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


Re: HTMLGenerator and Request Params

Posted by Joerg Heinicke <jo...@gmx.de>.
On 05.02.2004 21:21, Brent L Johnson wrote:

> Im attempting to pass some parameters through to
> the src of the HTML generator and I'm getting an
> IOException.  Here is my sitemap snippet:
> 
> <map:match pattern="test.xml">
>     <map:act type="request">
>         <map:parameter name="parameters" value="true"/>
>         <map:generate type="html"
> src="http://www.somewebsite.com/someSearchUrl.cgi?param={searchParams}"/
> 
>         <map:transform src="styles/test.xsl"/>
>         <map:serialize type="xml"/>
>     </map:act>
> </map:match>
> 
> I try to access this by going to
> http://localhost/test.xml?searchParams=my%20param
> 
> I get an error that says "Could not get resource
> http://www.somewebsite.com/someSearchUrl.cgi?param=my param"
> 
> It looks like it decodes the %20 and turns it back into a normal space
> but the generator does NOT like that.  Does anyone have any suggestions
> as to how I can get around this problem?  If I just hardcode my%20param
> for the generator it works just fine.

The request parameters are not decoded back in the sitemap. Does the raw 
request param module work for you? See 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23283 for an example. 
Unfortunately there is another bug open, that states that it might not 
work: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25102.

Joerg

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


RE: HTMLGenerator and Request Params

Posted by Slappy Tang <sl...@bjohnson.net>.
Umm - I don't think that's the answer to my question.
Maybe I wasn't clear enough in my explanation of
the problem.

When using the request action there's no need to include
the "../" before the parameter name.  My understanding
is that you do that when you are referring to things
matched by the pipeline pattern (i.e. <map:match
pattern="test/*.html">...).

I'm not having a problem accessing the parameter.. that
works just fine.  But if I specify something with a
SPACE in it, the HTMLGenerator throws an IOException.

Thanks,

- Brent



-----Original Message-----
From: Loic Quintin de Kercadio [mailto:loic.kercadio@anyware-tech.com] 
Sent: Friday, February 06, 2004 3:00 AM
To: users@cocoon.apache.org
Subject: Re: HTMLGenerator and Request Params


The answer is in a mail posted less than 48 hours ago... (4 Feb, 23:27)

The action (map:act) is a level (it can contain its own parameters) so
you have to use {../searchParams} instead of {searchParam} when you're
in your <map:act> 

Please, search in the mailing your problem before sending an email...

Loic


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


Re: HTMLGenerator and Request Params

Posted by Loic Quintin de Kercadio <lo...@anyware-tech.com>.
The answer is in a mail posted less than 48 hours ago... (4 Feb, 23:27)

The action (map:act) is a level (it can contain its own parameters) so 
you have to use {../searchParams} instead of {searchParam} when you're 
in your <map:act>

Please, search in the mailing your problem before sending an email...

Loic



Brent L Johnson wrote:

>Im attempting to pass some parameters through to
>the src of the HTML generator and I'm getting an
>IOException.  Here is my sitemap snippet:
>
><map:match pattern="test.xml">
>    <map:act type="request">
>        <map:parameter name="parameters" value="true"/>
>        <map:generate type="html"
>src="http://www.somewebsite.com/someSearchUrl.cgi?param={searchParams}"/
>  
>
>        <map:transform src="styles/test.xsl"/>
>        <map:serialize type="xml"/>
>    </map:act>
></map:match>
>
>I try to access this by going to
>http://localhost/test.xml?searchParams=my%20param
>
>I get an error that says "Could not get resource
>http://www.somewebsite.com/someSearchUrl.cgi?param=my param"
>
>It looks like it decodes the %20 and turns it back into a normal space
>but the generator does NOT like that.  Does anyone have any suggestions
>as to how I can get around this problem?  If I just hardcode my%20param
>for the generator it works just fine.
>
>Thanks,
>
>- Brent
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>  
>