cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piroumian, Konstantin" <KPiroum...@flagship.ru>
Subject Re: classDirURL = jndi protocol?!
Date Thu, 01 Nov 2001 18:38:17 GMT
>"Morrison, John" a écrit :
>>
<skipped />
>>
>> So; should I put the code back to how it was prior to the getRealPath ->
>> getResource conversion or add tests for "if(servletContextPath != null)"
and
>> make the decision based on that?
>>
>> Can't we use the jndi protocol to get at the jar files?
>>
>No, because we want to be able to list the contents of a directory. We
>should switch back to getRealPath() all classpath stuff in
>CocoonServlet.

Why not use the META-INF/manifest.mf and set the Class-Path there?
CocoonServlet can use getResourceAsStream() to read the data from the file
then will create its classpath according to the list. I think that this is
the best solution for this problem.
IMO, getRealPath() must be never used, except if you use paths outside of
application context (e.g. for a log file, that can be placed anywhere in the
file system).

Regards,
    Konstantin Piroumian

>--
>Sylvain Wallez
>Anyware Technologies - http://www.anyware-tech.com



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


Mime
View raw message