Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing .properties from web service (Axis)

 
Manish Malik
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

If a web service running on Axis/Tomcat, how would the web service load some preconfigured values from a .properties file?

For example, if the web service's Implementation class needs to access some stored key-value pairs from a .properties file, where should this file be placed?

For example,

FileInputStream myPropertiesFile = new FileInputStream("myconfig");
Properties myProperties = new Properties();
myProperties.load(myPropertiesFile);
// access properties from the object here...
myPropertiesFile.close();


Where should this file be placed (for example, in case of tomcat) for the web service to be able to read it?


Thanks.
 
Tim West
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you deploy the Web service in a WAR, then WEB-INF/classes is the usual location.


-Tim
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic