0 Replies Latest reply on Feb 13, 2006 10:37 AM by Oleg Frolov

    How to read configuration file from a bean - please help (Sp

    Oleg Frolov Newbie

      Hello everyone!

      I'm trying to do a web application with Spring. I deploy my application to JBoss. I have a business layer bean ResourceService. This bean has a setResourceTypesStorage(String fileNameUri) method. I have a declaration for this bean, like:

      <property name="resourceTypesStorage">
       <value>file:/WEB-INF/resources.owl</value>
      </property>
      

      This file contains configuration data, required by my bean to do it's job. Inside setResourceTypesStorage(String fileNameUri) method I call a method to read file contents by it's URI. This setter fails for JBoss is setting root directory to bin/. My questions are how to provide my bean with it's configuration file and what is "The Right Way" to do that?