1

I am really confused and hoping someone can give some direction. I am working on a GWT Spring application and want to store some application specific data in an xml config file which can be accessed on the server side. How and where should I store this and how can I access this data.

I want to do the same thing that the appSettings.config does in c#.net.

thanks.

Mon2
  • 515
  • 1
  • 5
  • 12

1 Answers1

3
war/WEB-INF

That folder is accessible by the server-side code, but not any clients over the internet.

Sources:

http://tomcat.apache.org/tomcat-7.0-doc/appdev/source.html#Directory_Structure http://docs.oracle.com/cd/E13222_01/wls/docs70/webapp/basics.html#136976

Reading the file

I suggest storing your configuration in a Java Properties file (eg: config.properties). That way you can load and read easily using java.util.Properties, as described on this stackoverflow post.

java.util.Properties also lets you load from an XML file.

Community
  • 1
  • 1
Churro
  • 4,166
  • 3
  • 25
  • 26