New to Java and I'm trying to find the equivalent for web.config application settings in .NET.
So far I have found examples of something like this:
Properties props = new Properties();
FileInputStream fis = new FileInputStream("c:/appSettings.properties");
props.load(fis);
However, I know that .NET caches the web.config file and inserting a call to Configuration.AppSettings[x]
is not expensive. I'm looking for an equivalent solution. So that I can call for Application settings multiple times through out a page load.
For Example:
<link href="<%= ResolveUrl("~/css/main.css?ver=" + Configuration.AppSettings["version"]) %>" rel="Stylesheet" type="text/css" media="screen" />
I can create a class that can do the equivalent, but i'd hate to reinvent the wheel if there is already something there.