How To Get the Properties in the Configuration File

I have a configuration file in the class path. the content of the file rough looks like below:
DISABLE_PASSWORDLESS_AUTH = true
REQUIRE_ACTIVATION = false
ENABLE_RSS = true
ENABLE_WATCH = true
ENABLE_ATTACHMENT = true
MAX_ATTACHMENT_SIZE = 1024
ENABLE_LOGIN_INFO_IN_SESSION = true
ENABLE_LOGIN_INFO_IN_COOKIE = true
ENABLE_LOGIN_INFO_IN_REALM = false
ENABLE_LOGIN_INFO_IN_CUSTOMIZATION = falseHow do I write Java code to pick up the value of the property; for example, ENABLE_RSS, in the configuration file?

One slight correction:
String path = "/path/to/topOfClassPath/";
InputStream is = getClass().getResourceAsStream(path + "properties.conf");jfbriere's code would try to load the properties from the same location in the ClassPath (e.g. package) from where the class is located. Got bit by that one more than once. I usually try to locate items like this in a "/resources" package located at the "top" of the ClassPath so I always know where they are and use a fully qualified path to load them - e.g.
getResourceAsStream("/resources/application.properites");

Similar Messages

  • How to get keydate properties in the report.

    Dear Experts,
    One of my query have a Keydate Properties which promote users when refreshing data.
    And then in the report, when I try to use function UserResponse("dp.kd.value") to get the value of this date, the result is a nubmer such as "124908480000"  but what I input is "2009-08-01".
    So how can I get  the result the same as what I input(2009-08-01) ?
    Thank you,
    Andy

    What is the format of your formula and what is in the back end.
    Are you using Date object?
    Use formula in this format...
    (UserResponse("Enter Date" );2);""));"MM/dd/yyyy")
    Regards,
    Bashir Awan

  • How we can limit the number of concurrent calls to a WCF service without use the Singleton pattern or without do the change in BizTalk Configuration file?

    How can we send only one message to a WCF service at a time? How we can limit the number of concurrent calls to a WCF service without use the Singleton pattern or without do the change in BizTalk Configuration file? Can we do it by Host throttling?

    Hi Pawan,
    You need to use WCF-Custom adapter and add the ServiceThrottlingBehavior service behavior to a WCF-Custom Locations.
    ServiceThrottlingBehavior.MaxConcurrentCalls - Gets or sets a value that specifies the maximum number of messages actively processing across a ServiceHost. The MaxConcurrentCalls property specifies the maximum number of messages actively
    processing across a ServiceHost object. Each channel can have one pending message that does not count against the value of MaxConcurrentCalls until WCF begins to process it.
    Follow MSDN-
    http://msdn.microsoft.com/en-us/library/ee377035%28BTS.10%29.aspx
    http://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicethrottlingbehavior.maxconcurrentcalls.aspx
    I hope this helps.
    Rachit
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • How to get Composite wsdls to the MDS

    Hello Guys,
    I have been trying to upload the Composite wsdl created using AIA Service Constructor to the MDS. I been using AIAHarvester using Jdeveloper.
    Did follow below mentioned steps from the Readme document
    To install the AIAHarvester Ant tasks into SOA Suite 11g or JDeveloper 11g:
    -Close any open Jdeveloper sessions.
    -Unzip the AIAHarvester zip file. You should end up with a folder AIAHarvester containing the contents of this zip file.
    -Edit tools11g.xml to match your JDeveloper installation.
    Replace every occurance of "$harvester.location$" with the location of the extracted AIAHarvester folder.
    -Merge the contents of tools11g.xml into your JDeveloper's product preferences XML file.
    This is located in ${JDEV_USER_HOME}\system11.1.xxxxxx\o.jdeveloper\product-preferences.xml .
    Insert it it after the lines:
    If there is an existing entry "<hash n="oracle.ideimpl.externaltools.ExternalToolList">, replace with the contents of tools11g.xml.
    If not, add it right after the initial <ide:preferences> element.
    -Start JDeveloper. Under Tools | External Tools you should see two new entries:
    -Submit this File to AIA LifeCycle and OER
    -Submit this Project to AIA LifeCycle and OER
    -Submit this Application to AIA LifeCycle and OER
    -For each of these
    -Select it
    -Click "Edit"
    -Click the "Properties" tab, and configure the missing properties to point to your OER server, SOA Server and LifeCycle DB .
    -To point to an external "HarvesterSettings.xml file: add a property called "settings.file", and set the value to the URL of the settings file,
    for example "c:\temp\MyHarvesterSettings.xml".
    -To run one of the tools:
    -Select a file in the "Applications Navigator".
    -Right click and select "Submit this File to AIA LifeCycle and OER" or "Submit this Project to AIA LifeCycle and OER" or "Submit this Application to AIA LifeCycle and OER".
    -"Submit this File to AIA LifeCycle and OER" will harvest just the selected file. (This works for zips and jars too).
    -NOTE: JDeveloper 11 does not support multi-select correctly for external tools. Even if you multi-select, only one file will be harvested.
    -"Submit this Project to AIA LifeCycle and OER" will harvest just the entire selected project .
    -"Submit this Application to AIA LifeCycle and OER" will harvest all the projects under Application selected.
    When trying to harvest composite wsdl using jdev. I get the following error saying the Harvest mode not set. But I have the set properties set to AIA as the Harvesting Mode.
    C:\\Oracle\\JDev1112_HOME\\AIAHarvester\\Harvester\\HarvesterSettings.xml\par
    Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor\par
    Adding reference: ant.executor\par
    Build sequence for target(s) `introspect-file' is [introspect-file]\par
    Complete build sequence is [introspect-file, introspect-application, introspect-project, ]\par
    \par
    introspect-file:\par
    Property "harvester.mode" has not been set\par
    [repository.submit] 16:11:40,197 0 [main] DEBUG com.oracle.aia.oer.sync.framework.ant.AIAIntrospectTask - jndi.properties file created\par
    [repository.submit] Using existing user key file...\par
    [repository.submit] 16:11:40,869 672 [main] DEBUG com.oracle.aia.oer.sync.framework.ant.AIAIntrospectTask - Harvesting to both DB and OER\par
    [repository.submit] 16:11:40,869 672 [main] DEBUG com.oracle.aia.oer.sync.framework.ant.AIAIntrospectTask - DB Harvesting Started\par
    [repository.submit] root dir = C:\\JDeveloper\\mywork\\Jdev1112\\Hierarchical\\QueryCustomerPartyQCPProvABCSImpl\par
    fileset: Setup scanner in dir C:\\JDeveloper\\mywork\\Jdev1112\\Hierarchical\\QueryCustomerPartyQCPProvABCSImpl with patternSet\{ includes: [composite.xml] excludes: [] \}\par
    [repository.submit] file = composite.xml\par
    [repository.submit] 16:11:41,401 1204 [main] DEBUG com.oracle.aia.oer.sync.framework.ant.AIAIntrospectTask - C:\\JDeveloper\\mywork\\Jdev1112\\Hierarchical\\QueryCustomerPartyQCPProvABCSImpl\par
    [repository.submit] 16:11:41,401 1204 [main] DEBUG com.oracle.aia.oer.sync.framework.ant.AIAIntrospectTask - composite.xml\par
    [repository.submit] 16:11:41,401 1204 [main] DEBUG com.oracle.aia.oer.sync.framework.ant.AIAIntrospectTask - Feeding file C:/JDeveloper/mywork/Jdev1112/Hierarchical/QueryCustomerPartyQCPProvABCSImpl/composite.xml from root directory C:\\JDeveloper\\mywork\\Jdev1112\\Hierarchical\\QueryCustomerPartyQCPProvABCSImpl into Composite Parser...\par
    [repository.submit] 16:11:41,416 1219 [main] DEBUG com.oracle.aia.AIACompositeParser - Open application module\par
    [repository.submit] Aug 19, 2010 4:11:42 PM oracle.adf.share.config.ADFConfigFactory getInstance\par
    [repository.submit] INFO: ADF Config instance implementation in use is : oracle.adf.share.config.MDSConfigFactory\par
    [repository.submit] 16:11:54,714 14517 [main] DEBUG com.oracle.aia.AIACompositeParser - Retrieving data source...\par
    [repository.submit] 16:11:54,730 14533 [main] DEBUG com.oracle.aia.AIACompositeParser - Connect application module to jdbc connection...\par
    [repository.submit] JBO-26061: Error while opening JDBC connection.\par
    \par
    BUILD SUCCESSFUL\par
    Total time: 17 seconds\par
    Process exited with exit code 0.\par
    Any insight on this would be much appreciate. Or is it right way of harvesting content to the AIA MDS.
    Regards
    Sabir

    Hi all,
    As I read through this thread, I'd like to make some clarification.
    AIAHarveter is NOT for publishing contents into MDS. It is to publishing metadata about your composites into Project Lifecycle Workbench and/or OER (pending upon your '-mode' parameter) as described by rwunder
    As part of the AIA best-practice in 11g, the dependent artifacts (e.g., the ABCS.wsdl your composite uses) shall be in the MDS a priori. This is achieve via the 'UpdateMetaDataDP.xml' script as described by Rahul. Further, the ABCS.wsdl reference in your composite.xml shall be in the form of oramds://apps/AIAMetadata/...
    If the jDev plug-in does not work, please use the AIAHarvester.sh command-line for now. Last question, where the readme of plug AIAHarvester in jDev come from? which AIA release?
    Thanks!

  • How to get maximal value from the data/class for show in Map legend

    I make WAD report that using Map Web Item.
    I devide to four (4) classes for legend (Generate_Breaks).
    I want to change default value for the class by javascript and for this,
    I need to get maximal value from the class.
    How to get maximal value from the data/class.
    please give me solution for my problem.
    Many Thx
    Eddy Utomo

    use this to get the following End_date
    <?following-sibling::../END_DATE?>
    Try this
    <?for-each:/ROOT/ROW?>
    ==================
    Current StartDate <?START_DATE?>
    Current End Date <?END_DATE?>
    Next Start Date <?following-sibling::ROW/END_DATE?>
    Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
    ================
    <?end for-each?>
    o/p
    ==================
    Current StartDate 01-01-1980
    Current End Date 01-01-1988
    Next Start Date 01-01-1990
    Previous End Date
    ================
    ==================
    Current StartDate 01-01-1988
    Current End Date 01-01-1990
    Next Start Date 01-01-2005
    Previous End Date 01-01-1988
    ================
    ==================
    Current StartDate 01-01-2000
    Current End Date 01-01-2005
    Next Start Date
    Previous End Date 01

  • I deleted most visited, latest headlines, getting started, yahoo, youtube, apple in mozilla's folder,how to get it back like the first time i installed? thx

    i deleted most visited, latest headlines, getting started, yahoo, youtube, apple in mozilla's folder,how to get it back like the first time i installed? thx

    if you hid the menu bar and the navigation bar simply press the alt button, this will bring back the menu bar and form there you can right click and select which bars you want shown

  • How to get Open Balance for the year and Total Ending Balance?

    For a given account, how to get Open Balance for the year (Cumulative Ending Balance) and Total Ending Balance (Cumulative Ending Balance)?
    Is there any function module available? or should I read from some tables? Please advice.

    Hello Paul,
    You could try calling one of the following BAPIs - see which one meets your requirement. They are documented well so shouldn't be a problem finding out the correct one for your requirements.
    BAPI_GL_GETGLACCBALANCE      
    BAPI_GL_GETGLACCCURRENTBALANCE
    BAPI_GL_ACC_GETBALANCE      
    BAPI_GL_ACC_GETCURRENTBALANCE
    BAPI_GL_ACC_GETPERIODBALANCES
    BAPI_COND_VAL_DECRE_BALANCES
    You might have to put in some of your own logic after the BAPI call to get what you want.
    Hope this helps,
    Cheers,
    Sougata.
    p.s. Also look at FM FAGL_GET_ACCOUNT_BALANCE
    Edited by: Sougata Chatterjee on May 7, 2008 11:47 AM

  • How to get a question in the course placed anywhere in the course and does not appear in the quiz result or total number of questions. Pretest would work except it can't go anywhere in the course (at least for me it can't)

    How to get a question in the course placed anywhere in the course and does not appear in the quiz result or total number of questions. Pretest would work except it can't go anywhere in the course (at least for me it can't)

    Use a normal question, and do not add the score to the total score. That will give you a correct score at the end. But the total number of questions, that system variable will still take into account all questions. You'll need a user variable, and calculate its value by subtracting 1 from the system variable cpQuizInfoTotalQuestionsPerProject. Same for the progress indicator if you want to show it?
    Customized Progress Indicator - Captivate blog
    If you want to allow Review, you'll have to tweak as well. You didn't specify the version, and all those questions I now mentioned.
    And my approach, since you talk about only one question: create a custom question, because you'll have total control then.

  • How to get boot camp in the emac

    how to get boot camp in the emac

    Furthermore, eMacs can only emulate the Windows environment, whereas Intel CPU Macs including the iMac you have running 10.6.8 can virtualize Windows.  Emulation is a poor man's solution, because software is used to replace functions that normally take place with hardware.  You can use the iMac to do any data conversion before it gets sent back to the eMac over a network.  See my FAQ* regarding Windows on the Mac:
    http://www.macmaps.com/macosxnative.html#WINTEL

  • Have a new PC desktop with 4 hard drives, new c, d and old c, d, My ipad library is in old c, how to get my itune open the right drive, it keeps on open in new c drive.

    Have a new PC desktop with 4 hard drives, new c, d and old c, d, My ipad library is in old c, how to get my itune open the right drive, it keeps on open in new c drive. It said my computer is not authorized. I want to move all the old c to the new c drive, or get the itune to open my old c drive when I log in.

    might be some help on one of these links.
    Windows - Change iPad default backup location
    http://apple-ipad-tablet-help.blogspot.com/2010/07/change-ipad-default-backup-lo cation.html
    Windows - Changing IPhone and iPad backup location
    http://goodstuff2share.wordpress.com/2011/05/22/changing-iphone-and-ipad-backup- location/
    Sync Your iOS Device with a New Computer Without Losing Data
    http://www.howtogeek.com/104298/sync-your-ios-device-with-a-new-computer-without -losing-data/
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive
    https://discussions.apple.com/docs/DOC-3141
     Cheers, Tom

  • HT4889 Replacing System hard drive with a new one. How to get everything over to the new boot drive?

    Replacing System hard drive with a new one. How to get everything over to the new boot drive? Should I use Carbon Copy or does apple have a better untility to do this?
    I can't get my current system drive (OSX 10.8.3) to start on the first try. I always have to shut down and restart again to finally see the Apple logo.
    Have used disc utility to repair the disc and permissions several times and that works. The next time I boot up, it works fine and I get the apple logo, but then the second time I boot up, it's back to the blank screen again and it only boots after the second try.  I have tried this repair three different times now always with the same result. Works right the first try (after the repair) then from the second time on it doesn't work. I just get the white screen until I reboot a second time.
    Thinking I should change drives but what's the easist and best way to move everything over to the new drive so it will boot correctly with all my data on it. This is the system drive for a Pro Tools 10HD setup. MacPro 3,1 with 16 gigs ram and OSX10.8.3 on it.
    Thanks for any help!

    If you have a time machine back up of your current drive you can do this
    Shut down your computer, install the new drive. While the computer is off plug in the external hard drive that you have your time machine back up on. Hold Option key while the computer turnes on, let go of the option key once you get a grey screen. Shortly after you'll see  a list of bootable drives, select the one that has your time machine back up on it and boot into that drive.
    From there go into disk utility, format your new drive too, osx extended journaled ( I think, double check that, its been awhile since ive had to do this), hit format
    Exit disk utility and then you can use time machine to copy all your exisit data to the new hhd and then your pretty much done.
    There is also a program called Carbon Cloner that will do esentially the same thing however I've never uesed it.

  • How to get each thread in the threadpool

    Hi,everyone.I'm now learning java.util.concurrent package and I have two questions about the threadpool.
    1) How to get each thread in the threadpool;
    2) How to get each thread's data in the threadpool and dispaly them onto GUI;
    e.g :
    There are 5 threads in the threadpool(ThreadPoolExecutor) and I have 100 tasks(Runnable or Callable),every task scans a directory(every task scans a different directory),how can I display the "real-time" count of the files in the directory which the current 5 threads in the threadpool scan onto the ListView Items in the GUI?

    Willings wrote:
    Hi,everyone.I'm now learning java.util.concurrent package and I have two questions about the threadpool.
    1) How to get each thread in the threadpool;You don't
    2) How to get each thread's data in the threadpool and dispaly them onto GUI;
    e.g : You don't
    There are 5 threads in the threadpool(ThreadPoolExecutor) and I have 100 tasks(Runnable or Callable),every task scans a directory(every task scans a different directory),how can I display the "real-time" count of the files in the directory which the current 5 threads in the threadpool scan onto the ListView Items in the GUI?You should notify your "monitor" when you add something to the pool, and the Runnable/Callable should notify the same "monitor" when it starts to execute, and during its processing. Finally you notify the monitor when the execution has completed.
    Kaj

  • How to get two parameters in the same line of selection screen?

    hello
    i need to get my selection csreen like bellow.
    r1 radiobuttion  -some space --p1 parameter
    i should not get the parameter in the next line of  radiobuttion.
    how to get two parameters in the same line of selection screen?

    hi....
    modify the following code
    it will work
    SELECTION-SCREEN BEGIN OF BLOCK SL1 WITH FRAME TITLE TEXT-003.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(15) TEXT-001
                     FOR FIELD P1.
    SELECTION-SCREEN POSITION POS_LOW.
    PARAMETERS : P1 TYPE   C USER-COMMAND R2 RADIOBUTTON GROUP R2 DEFAULT 'X',
      P2 TYPE SCARR-CARRNAME,
      P3 TYPE CHAR1 RADIOBUTTON GROUP R2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK SL1.

  • I excluded iphone from controls in Keynote. How I get it back on the list to use Keynote remote?

    I excluded iphone from controls in Keynote. How I get it back on the list to use Keynote remote?

    Welcome to the Apple Community.
    If you haven't turned find my phone off on the device, it should just reappear next time it is connected to an appropriate network. If you have turned off find my phone, turn it back on.

  • I am using the window xp and firefox 6. I see many videos on youtube. How I get that videos from the catch folder and where is it?

    I am using the window xp and firefox 6.
    I watch the youtube videos online.
    How I get that video from the catch folder and where that catch folder are situated in the window xp.

    ''How can I view or retrieve a video from Firefox's cache''
    To actually view/retrieve the file from the cache and its web address you can use
    the "Cache Viewer" extension 32.8KB
    * https://addons.mozilla.org/firefox/addon/cacheviewer/
    * http://dmcritchie.mvps.org/firefox/firefox.htm#cacheviewer
    For you to be able to view the cached file you would have had to have watched the entire file.
    The latest version of the extension is 0.7b available in all versions you would have to override compatibility by any of these methods
    * checking or pick up one of the xpi versions in the reader comments for Firefox 6.0
    * extensions.checkCompatibility.6.0 set to False
    *: http://kb.mozillazine.org/Extensions.checkCompatibility
    * or with an extension "Add-on Compatibility Reporter" (84.0 KB) seems preferred in this group
    *:https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/
    There are also extensions such as Video downloader 132.8 KB
    * Download YouTube Videos + Flash Video Downloader / Download-Helper
    *:https://addons.mozilla.org/firefox/addon/download-youtube-videos/
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem after you've tried several things.</small>

Maybe you are looking for

  • How can i disable an Action listener temporary?

    hi folks, I have a GUI with many Jcomboxes. Each one of them has an actionlistener. The idea was: when one of those comboboxes is selected, then the selected value will appear on ALL the comboboxes (by using setSelectedIndex(int index)). The problem

  • Cisco VPN no longer works with the E4200

    VPN issue with the E4200.  Validated that VPN passthrough is enabled.  Using Cisco VPN as the client.  Used to work prior to the firmware upgrade so not sure what has changed.  Error code on the Cisco VPN client is "Secure VPN connection terminated b

  • How to access the right broker in a multi broker envt.

    On my server there are two different broker instances running on two different ports (7676 & 9000). The broker running on the default port is instantiated by a third party software/server. So I created a new broker for port 9000 and want my applicati

  • FCP 5.0.4 won't render all tracks.

    FCP 5.0.4 fails to render all of my tracks. There are three, and in some places, four video tracks. It only renders the third and fourth tracks. Plays fine in the timeline but will not output in any format. Audio is fine. Video is all black except wh

  • How to implement the WIP in production planning module?

    Hi Gurus, Good afternoon! We are planning to Implement the WIP in Production Planning Module. Current set-up, we create production order and confirmed for all process in production transaction especially the consumption of raw materials and Goods rec