You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Michael Gerzabek <mi...@at.efp.cc> on 2002/02/12 16:31:37 UTC
Howto: call an internal pipeline from a component
Hello!
I need to call an internal pipeline from a component that's working
in the background.
try {
String source = "cocoon://i-post-XRFC/" + conf.getAttribute("name") + "/"
+ conf.getAttribute("type") + "/" + id;
URLFactory urlFactory = (URLFactory)manager.lookup(URLFactory.ROLE);
URL url = this.urlFactory.getURL(source);
...
and then I get
java.net.MalformedURLException: unknown protocol: cocoon
at java.net.URL.<init>(URL.java:480)
at java.net.URL.<init>(URL.java:376)
at java.net.URL.<init>(URL.java:330)
at
org.apache.cocoon.components.url.URLFactoryImpl.getURL(URLFactoryImpl.java:6
6)
Is there a way to do so?
- Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
RE: Howto: call an internal pipeline from a component
Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Michael Gerzabek [mailto:michael.gerzabek@at.efp.cc]
>
> Hello!
>
> I need to call an internal pipeline from a component that's working
> in the background.
> try {
> String source = "cocoon://i-post-XRFC/" + conf.getAttribute("name")
+ "/"
> + conf.getAttribute("type") + "/" + id;
> URLFactory urlFactory = (URLFactory)manager.lookup(URLFactory.ROLE);
"cocoon:" is not a protocol, it's *pseudo* protocol.
> URL url = this.urlFactory.getURL(source);
> ...
>
> and then I get
> java.net.MalformedURLException: unknown protocol: cocoon
> at java.net.URL.<init>(URL.java:480)
> at java.net.URL.<init>(URL.java:376)
> at java.net.URL.<init>(URL.java:330)
> at
>
org.apache.cocoon.components.url.URLFactoryImpl.getURL(URLFactoryImpl.ja
va:6
> 6)
>
> Is there a way to do so?
You have to have resolver. Then:
Source source = resolver.resolve("cocoon://i-post-XRFC/.....");
Vadim
>
> - Michael
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org