You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Piroumian, Konstantin" <KP...@flagship.ru> on 2001/01/29 16:22:59 UTC

Taglib from resource://

    Hi!

Can anybody tell me is it possible to place a taglib (an xsl file) into a
jar file and set the path to it in cocoon.properties like this:
processor.xsp.logicsheet.abs.java      =
resource://com/protek/abs/apps/web/abs-page.xsl

Tried to do it and get a NullPointerException at the compilation stage (I
think, that it is because ClassLoader could not find the resource).

Path to the JAR file added to the CLASSPATH and other classes from it are
available and used successfully.

When I change the path to a file:///... everything's OK.

I need to use resource or a relative path to deploy my application to other
servers without problems.

Thank you.
Best regards,

Konstantin Piroumian
Software engineer
--------------------------------------------------
Protek Flagship LLC
Phone: + 7 095 795 0520 (add. 1288)
Fax: + 7 095 795 0525
E-mail: kpiroumian@flagship.ru
http://www.protek.com
--------------------------------------------------


Re: Taglib from resource://

Posted by Berin Loritsch <bl...@apache.org>.
"Piroumian, Konstantin" wrote:
> 
>     Hi!
> 
> Can anybody tell me is it possible to place a taglib (an xsl file) into a
> jar file and set the path to it in cocoon.properties like this:
> processor.xsp.logicsheet.abs.java      =
> resource://com/protek/abs/apps/web/abs-page.xsl
> 
> Tried to do it and get a NullPointerException at the compilation stage (I
> think, that it is because ClassLoader could not find the resource).
> 
> Path to the JAR file added to the CLASSPATH and other classes from it are
> available and used successfully.
> 
> When I change the path to a file:///... everything's OK.
> 
> I need to use resource or a relative path to deploy my application to other
> servers without problems.


A note of caution:  Not all servlet engines are the same.  For instance
IBM WebSphere does not allow you to pull resources from jars loaded by
their ineptly named "PowerClassLoader".  They can only be pulled from
jars in the System ClassLoader.