Return-Path: X-Original-To: apmail-cocoon-users-archive@www.apache.org Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1B77478CD for ; Wed, 14 Sep 2011 12:13:35 +0000 (UTC) Received: (qmail 60319 invoked by uid 500); 14 Sep 2011 12:13:34 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 60271 invoked by uid 500); 14 Sep 2011 12:13:34 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 60264 invoked by uid 99); 14 Sep 2011 12:13:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Sep 2011 12:13:34 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [78.134.5.44] (HELO rovere.tirasa.net) (78.134.5.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Sep 2011 12:13:28 +0000 Received: from localhost (localhost [127.0.0.1]) by rovere.tirasa.net (Postfix) with ESMTP id 2CC9C182E8D for ; Wed, 14 Sep 2011 14:05:52 +0200 (CEST) X-Virus-Scanned: amavisd-new at tirasa.net Received: from rovere.tirasa.net ([127.0.0.1]) by localhost (rovere.tirasa.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NMwMT-U1zKFC for ; Wed, 14 Sep 2011 14:05:46 +0200 (CEST) Received: from [192.168.0.2] (mogano.tirasa.net [192.168.0.2]) by rovere.tirasa.net (Postfix) with ESMTPSA id 46C3B182E8B for ; Wed, 14 Sep 2011 14:05:46 +0200 (CEST) Message-ID: <4E709A4D.1010204@apache.org> Date: Wed, 14 Sep 2011 14:13:01 +0200 From: =?ISO-8859-1?Q?Francesco_Chicchiricc=F2?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: cocoon 3: Javascript in jars References: <4E7076D2.1050605@cc.oulu.fi> <4E708734.5080504@oulu.fi> <4E7096ED.3010704@oulu.fi> In-Reply-To: <4E7096ED.3010704@oulu.fi> Content-Type: multipart/alternative; boundary="------------040406050906090901030804" X-Virus-Checked: Checked by ClamAV on apache.org --------------040406050906090901030804 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit On 14/09/2011 13:58, Andre Juffer wrote: > On 14/09/11 14:35, Javier Puerto wrote: >> [...] >> AFAIK, Resource protocol is not yet implemented in Cocoon 3. > > There may be another way. It is possibly called differently? I tried > "classpath://...", but didn't work either. E.g. Spring uses this > protocol as well to load configuration located in jars. Very convenient. I did this in another (Cocoon3-based) project: It should be enough to add a class like [1], then add a bean like as in one of spring's XMLs. Regards. [1] https://forge.onehippo.org/svn/hct/trunk/core/src/main/java/org/onehippo/forge/hct/cocoon/internal/ClasspathURLStreamHandlerFactory.java -- Francesco Chicchiricc� Apache Cocoon Committer and PMC Member http://people.apache.org/~ilgrosso/ --------------040406050906090901030804 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 14/09/2011 13:58, Andre Juffer wrote:
On 14/09/11 14:35, Javier Puerto wrote:
[...]
AFAIK, Resource protocol is not yet implemented in Cocoon 3.

There may be another way. It is possibly called differently? I tried "classpath://...", but didn't work either. E.g. Spring uses this protocol as well to load configuration located in jars. Very convenient.

I did this in another (Cocoon3-based) project: It should be enough to add a class like [1], then add a bean like as

    <!-- Using classpath: resources -->
    <bean class="org.onehippo.forge.hct.cocoon.internal.ClasspathURLStreamHandlerFactory"/>

in one of spring's XMLs.

Regards.

[1] https://forge.onehippo.org/svn/hct/trunk/core/src/main/java/org/onehippo/forge/hct/cocoon/internal/ClasspathURLStreamHandlerFactory.java
-- 
Francesco Chicchiriccò

Apache Cocoon Committer and PMC Member
http://people.apache.org/~ilgrosso/
--------------040406050906090901030804--