-
Jan 19th, 2007, 01:31 PM
#1
Properties file outside .EAR file
Hi,
This question was actually answered in an other thread but i got an error when trying to implement it. Below are the details.
I am basically trying to get the ${jboss.server.dir} but got error saying that the jboss.server.dir could not be resolved.
My idea is to access the properties file outside war file but for testing purpose i am trying to read the jboss server directory to check if the path is fetched. i wrote a simple pojo class and passed the jboss.server.dir param in the constrcutor arg and just printing it to see if it works. i also set the systemPropertiesMode=2 to always ready the properties from the system properties. but i am getting error.
am i doing anything incorrect?
thank you
-darshan
<beans>
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer">
<property name="location" value="/WEB-INF/classes/test_application.properties"/>
<property name="systemPropertiesMode" value="2"/>
</bean>
<!-- Ctest Configuration -->
<bean id="ctest" class="com.util.TestUtil">
<constructor-arg index="0">
<value>${jboss.server.dir}</value>
</constructor-arg>
</bean>
</beans>
-
Jan 19th, 2007, 01:34 PM
#2
Here is the thread i was referring to.. i follwed what Chris Lee had suggested but dint work.. 
http://forum.springframework.org/sho...roperties+file
-
Jan 19th, 2007, 02:09 PM
#3
Have you actually tried to System.out the property from your test class, just to see if the property is actually there at all?
-
Jan 19th, 2007, 02:25 PM
#4
Hi Karl..
great pointer...i did a system.out.println for jboss.server.dir and i got null as output.. So how should i go about this now.. when should the jboss.server.dir be set.
Thanks
Darshan
-
Jan 19th, 2007, 02:29 PM
#5
I'm sorry, thats as far as my JBoss knowledge stretches
. Atleast you know the property just isn't set, Spring config is fine. I guess my next stab would be jboss forums, manuals, etc....
-
Jan 19th, 2007, 02:52 PM
#6
Thanks Karl.. Actually the key was wrong. I got the complete list of jboss keys from this link
http://wiki.jboss.org/wiki/Wiki.jsp?...BossProperties
Appreciate your help..
Bye
Darshan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules