<font face="Luxi Sans">Hi all,<br>
<br>
When trying to migrate our web application which currently runs on
Apache Geronimo to JBoss 6.0.0.Final I came across the following.<br>
<br>
Is there a way to add a custom directory to the web application's
classpath without changing the server configuration manually. In
our situation we have multiple web applications deployed to one
server each having their own properties file and other
configuration stuff </font><font face="Luxi Sans">(for some
reason this data is put outside the ear)</font><font face="Luxi
Sans">. In the application I want to read these files in an
application independent manner, i.e. without the need to know the
webapp's name. On Geronimo we use the 'classesDirs' property of
the SharedLib gbean in geronimo-application.xml to extend the
application's classpath with the specific webapp's configuration
directory.<br>
<br>
On JBoss I was thinking about the following configuration. Let's
say I have webapp1 and webapp2 each using a separate
config.properties file. I can put these files e.g. in the JBoss
conf directory as follows:<br>
</font><font face="Luxi Sans">$JBOSS_HOME/server/<server-name>/conf</font>/webapp1/config.properties<br>
<font face="Luxi Sans">$JBOSS_HOME/server/<server-name>/conf</font>/webapp2/config.properties<br>
<font face="Luxi Sans">If I could add the </font> <font face="Luxi
Sans">$JBOSS_HOME/server/<server-name>/conf</font>/<webapp>
directory to the application's classpath the properties file can be
read by calling getResourceAsStream("/config.properties").<br>
<font face="Luxi Sans">Is there a proper way to achieve this?<br>
<br>
I know the $JBOSS_HOME/server/<server-name>/conf directory
is on the classpath by default so I can read the properties using
</font>getResourceAsStream("/<webapp>/config.properties") but
that's not what I want.<font face="Luxi Sans"><br>
<br>
Thanks in advance.<br>
<br>
Regards,<br>
Adrie</font>