cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Johnston <>
Subject Re: How can I redirect a Cocoon uri to my regular cgi-bin ? NB with request parameters, please.
Date Sun, 19 Mar 2006 22:31:25 GMT
Ken Starks wrote:
> I have a simple (Sorry, its Hello, World) script, writen in python.
> It works fine for example using:
>  http://localhost/cgi-bin/"fred"&n=4
> Now I have wish to have it as part of a Cocoon project called 'Graphics' and 
> I eventually got it to partly work with the following entry in
>   $Catalina_Home/webapp/Graphics/sitemap.xmap
>         <map:match pattern="Hello">
>           <map:read src="http://localhost/cgi-bin/"  />
>         </map:match> 
> Script ' is the same as except it misses out the
> <?xml ... ?> line
> The result, in my browser, of typing 
>     http://localhost:8888/Graphics/Hello?name=Fred&n=12
>    is a web page, but it completely ignores the request parameters 'name' and 
> 'n'. It uses the defaults, which are name=World&n=10
> What should I do? 

You need to pass the request query string (the part after the ? in the
URL) to your python page. You can use the request input module for this:

<map:match pattern="Hello">
src="http://localhost/cgi-bin/{request:queryString}"  />

Hope that helps

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message