This content has been marked as final.
Show 4 replies
-
1. Re: Loading property files in classpath
mkprabhu_2009 Mar 10, 2009 6:04 AM (in response to mkprabhu_2009)this is my classpath entry in jboss-service.xml
<classpath codebase="myapp/conf" />
-
2. Re: Loading property files in classpath
jaikiran Mar 10, 2009 7:42 AM (in response to mkprabhu_2009)Try
this.getClass().getClassLoader().getResource(filename);
-
3. Re: Loading property files in classpath
mkprabhu_2009 Mar 10, 2009 8:23 AM (in response to mkprabhu_2009)Actually I am migrating the application from Websphere to jboss AS 5.0.0GA. So no luxury of changing the code.
If I include the property file path in the system classpath (JBOSS_CLASSPATH) the files are looked up. But it fails when given in jboss-service.xml
Did I miss any syntax?
Thankyou -
4. Re: Loading property files in classpath
jaikiran Mar 10, 2009 8:29 AM (in response to mkprabhu_2009)"mkprabhu_2009" wrote:
If I include the property file path in the system classpath (JBOSS_CLASSPATH) the files are looked up. But it fails when given in jboss-service.xml
That's because the code expects in the system classpath. Shouldn't have been written that way if you wanted to configure it through the jboss-service.xml. So all you can do is add the file to system classpath or maybe change the code.