cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Mikushin" <i...@vismech.ru>
Subject [C1] classloading problem
Date Thu, 15 Feb 2001 21:45:56 GMT
Hi!

I encountered the following problem developing an XSP application with
Cocoon 1.x:

my XSP page instantiates classes that need to construct
java.util.ResourceBundle objects form .properties files with a standard
mechanism:

    ResourceBundle myRes = ResourceBundle.getBundle( "MyRes" );

In order for this to work, MyRes.properties file must be located in a
directory or in a JAR on the classpath, otherwise
java.util.MissingResourceException is thrown.

I have put the .properties files into WEB-INF/classes directory but Cocoon
seems not to search the local classpath for the web application.

When I put the files into $TOMCAT_HOME/classes everything worked fine. But I
only need to load these files into my particular web application and
actually to use Cocoon as a servlet in an isolated web application.

Furthermore, when I tried to put cocoon.jar and all Cocoon-related jars into
WEB-INF/lib for my app (with no Cocoon-related jars on Tomcat's classpath),
Cocoon threw an exception, saying it couldn't find some class (which was
actually packaged in cocoon.jar). I got this situation with Cocoon 1.7.4
thru 1.8.2.

Thanks in advance,

Ivan


Mime
View raw message