cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: flowscript
Date Mon, 17 Jan 2005 07:26:54 GMT
Mygrp wrote:
> hi,
> 
> I have a simple flowscript with a function which will call a certain url.
> 
> The flowscript is calurl.js
> 
> function main()
> {
>  var id=cocoon.request.get("id");
>  cocoon.sendPage("http://www.abc.org/er.php?id=" +  id);
> }
> 
> The sitemap pipeline is as follows
> 
>  <map:match pattern="fspa">
>         <map:call function="main"/>
>        <map:serialize type="html" />
>       </map:match>
> 
> However on execution the following error is seen:
> 
> file:/usr/local/src/cocoon-2.1.3/build/webapp/headlines/calurl.js",
> line 4: uncaught JavaScript exception: at main
> (file:/usr/local/src/cocoon-2.1.3/build/webapp/headlines/calurl.js,
> Line 4): java.lang.Exception: uri is not allowed to contain a scheme
> (cocoon:/ is always automatically used)
> 

cocoon.sendPage(AndWait) can only send Cocoon pipelines and NOT something else.
You either have to encapsulate your external call into a Cocoon pipeline 
(FileGenerator calling your URL) or you redirect to the URL. cocoon.redirectTo(url).

HTH

-- 
Reinhard

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


Mime
View raw message