How to load some setting in application bean on web application start up?

Hi
Thank you for reading my post
Is it possible to load some setting in applicationBean when the web application starts?
And also
I need to store some of my application configuration in a .properties file
can some one please help me with the following items ?
-How i can access the .properties file
-where should i put it.

Hi
Thank you
How i can load the .properties files ?
how should i find the path ? some servers does not allows an application to find the real path to load a file.
Thanks

Similar Messages

  • Pre-load the Cache during Application-Start Up

    Our requirement is to pre-load the cache during the application start-up most probably during Authentication/Authorization Service is invoked.
    We plan to load the data for other services from database into Coherence cache so that when user access that particular service he ends up hitting the Cache instead of database.
    Any pointers/suggestions on how to pre-load the cache during application start-up would be greatly appreciated. We are using Spring, Hibernate, Weblogic Web Services
    Regards,
    Bansi

    Hi Bansi,
    I were using following approach.
    First, we never use CacheFactory.getCache() in application code instead all instances of named cache were injected.
    On server side, I have an CacheInitializerBean which were starting cache preloading process (in separate thread). After preloading a special marker entry were put to the cache, indicating what data in the cache are consistent.
    When injecting named cache instance, we use a factory. This factory use CacheFactory.getCache() internally, but it check presence of marker object in cache an blocks until marker object will appear.
    Well in practice things are little more complicated but this is basic idea.
    Preload cache asynchronously and use marker to indicate completion of loading process.
    Hope this will help.
    Regards,
    Alexey

  • How to Hide some Rows in a List view Web Part using JavaScript ?

    How to Hide some Rows in a List view Web Part using JavaScript ?

     Here is the code that worked for me:
    var Elements = document.querySelectorAll('div[id=WebPartWPQ3] table[class=ms-listviewtable]>tbody tr .ms-vb-lastCell.ms-cellstyle.ms-vb2')
    for(var i=0, n = Elements.length; i < n; i++)
     if(Elements[i].innerHTML=="India")
    Elements[i].parentNode.setAttribute("style","display:none")
    WebPartWPQ3 -> ID of webpart Div
    ms-listviewtable -> class name of table in Div
    ms-vb-lastCell.ms-cellstyle.ms-vb2 -> classname of td to get text

  • Uregnt - How to Load Flat File into BW-BPS using Web Browser

    Hello,
    We have followed the 'How to Load Flat File into BW-BPS using Web Browser' guide to build BSP web front-end to upload flat file.  Everything works great but we have a requirement to populate the Planning Area Variables based on BSP drop down list with values.  Does anyone know how to do this?  We have the BSP coded with drop down list all we need to do now is populate variables.  We can populate the variables through the planning level (hardcoded) but we need to populate them through the web interface.
    Thanks,
    Gary

    Hello Gary,
    We have acheived the desired result by not too a clean method but it works for us.
    What we have done is, we have the link to load file in a page where the variables can be input. The user would then have the option to choose the link to load a file for the layout in that page.
    By entering the variable values in the page, we are able to read the variables for the file input directly in the load program.
    Maybe this approach might help.
    Sunil

  • How to Load Sound In Java Application?

    Hi, i dunno what the codes to load sound in java application, can anyone help me and provide me with the codes? Thanks a lot.

    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2Btitle%3Aapplication+%2Btitle%3Asound&col=javaforums
    BTW: You can doo this yourself

  • How to load some text from properties file ?

    Hi again,
    problem is i dont know how can i load a text from properties file like #{xxx['key']} in managed bean, i tried to find some solution but havent seen this kind of use this file in java code. Is it supposed to work only for labels in jspx pages ?
    thanks for help ...

    Hi,
    a managed bean is nothing special from any other Java file. However, if you look at SRDemo, you find a nice way of using the same message bundle that you use on the page
    See the messageFromBundle() method in the JSFUtils class of the UserInterface project
    Frank
    P.s. You can download and setup SRDemo from JDeveloper help--> check for updates

  • How to load Dimensions in Planning Application

    Hi,
    Please can someone help me loading dimensions and Data in Planning application using Loading Metadata Using the Outline Load Utility.
    Please guide.... you can email at [email protected]

    Hi Mohammed,
    Please check John's blog: http://john-goodwin.blogspot.com/2008/08/time-to-look-in-bin.html
    This is how I learned to use the OLU.
    I'd also check the admin guide.
    To load data: http://download.oracle.com/docs/cd/E17236_01/epm.1112/hp_admin/ch05s02s01.html
    To load metadata: http://download.oracle.com/docs/cd/E17236_01/epm.1112/hp_admin/ch05s02s02.html
    Cheers,
    Mehmet

  • How to load content from the application directory?

    I'm currently working on an AIR desktop application that will be distributed on OSX and Windows. The main applicaiton SWF will load a child swf that has been packaged. When I've attempted to load the child SWF via loader.load() with a URI of "app:\\TheChildContentSWF.swf", the load has failed with an IOError. If I force a copy of the the SWF (in OSX) to the MacOS directory where the executable resides, the child SWF would load. I was a little stumped by this so I decided to check what the nativePath of the application directory was via File.applicationDirectory.nativePath (it turned out to point at the Resources directory). Does the "app://" URI point to different paths when using Loader vs File?
    If so, is there a way to package content so that it is installed in a directory that Loader can recognize without hitting security sandbox issues?
    Visual of the OSX app directory structure (simplified)
    MyApp.app\
         Contents\
              Frameworks\
              MacOS\
                   executable
              Resources\
                   TheAppSWF.swf
                   TheChildContentSWF.swf
                    ... // other content
    Thanks for any help!
    Josh

    When loading application, move the swf to the applicationStorage folder if it doesn't exist already.
    Something like ...
    private var swfDistribute:File = File.applicationDirectory.resolvePath('ResourcesChildContentSWF.swf');
    private var swfLocal:File      = File.applicationStorageDirectory.resolvePath('TheChildContentSWF.swf');
    private function onCreationComplete():void
       if (!swfLocal.exists) {
          if (swfDistribute.exists) {
             swfDistribute.copyTo(swfLocal);
    Then you should be able to call your loader.load() URI with the variable (swfLocal)

  • How to load pdf in flex application for android os

    I loaded pdf in stagewebview which works good in IOS but not in android.
    The pdf file is loaded from the application storage directory.
    Please help me in resolving the problem. Thank you in advance.

    I think that my problem was i couldnt see pdf in my app running in ipad simulator of FlashBuilder in a flex mobile project in my laptop. what i read said that StageWebView create an instance of default browser in your machine. So that if we cant see pdf in ipad simulator is because also you cant see it in the default browser.
    Apart of this, i run this example in other machine, and i could see it, so its not problem of your code, but from your browser probably doesnt have pdf plugin installed. Correct me if i´m wrong.
    Cheers!

  • How to load new sets of parameter to an applet without reloading applet

    hello,
    I am making an application wherein the there are 2 frames the left and the right. the left frames contains links and the right frame contains an applet that displays the images of the documents.
    So for example:
    DOC00001 has Image 1 and Image 2
    DOC00002 has Image 3 and Image 4
    At first applet will be loaded, and the loading applet (Splash screen) appears then displays Image 1 and Image 2. But when I click DOC00002, it is reloaded again(Splash Screen) before displaying image 3 and 4.
    Is there a way wherein I just call a function from the applet so that I dont need to reload again the applet and just change its display?
    hoping for help. thank you

    Hi,
    You can make an executable jar file such that when you double click on that it starts running. Just follow the steps.
    1. Open a notepad and write the following
    Main-Class: XXXXXXXX
    XXXXXXX means Your Main Class name. Don't forget to press Enter after you write your class name.
    2. Save the file as Mani.mf
    3. In the commant prompt ( your directory ) type following lines.
    jar cmf Mani.mf Demo.jar *.*
    4. This will make a jar file which is executable jar file
    Hope this will help you.
    Deepak

  • Preferences: how to show some setting based on other settings

    hi
    i am trying to have a boolean setting control the display of another setting (a configuration)
    like it happens on network settings when u turn on or off and it shows available networks or not

    I recommend using view selector instead of column selector

  • How to preserve some files inside application directory after a Redeploy?

    Hi, all.
    My application (recently refactored to run from JServ to OC4J) have an Upload procedure that puts a file inside the context from wich the Upload.jsp is being called. I.e, www.xyz.com/app_name/upload.jsp when called puts a file inside $ORACLE_HOME\j2ee\OC4J_xxx\applications\blaff\uploaded_files (blaff is the directory that contains the Upload.jsp file).
    Now, we have about 30MB inside uploaded_files directory and a problem: when redeploying the application, the "blaff" directory is removed and all uploaded files are lost.
    There is a way to "preserve" these files? The other issue is related to big quantity of application images, pdf's and Xls's: about 40MB!!! My final EAR file is about 60MB, and it's difficult to transmit it from developer's machine to the server's machine through a VPN.
    Can somebody help me with this issue?
    Thanks!

    You can use getClass().getResource(classpath)
    to get a stream version of the data from your
    jar file. If you need to put it in a file, you
    can write that stream to a file in a temp directory.
    classpath is the classpath of your js file

  • How to load a Query in the  bne_stored_sql in WEB ADI table.

    Hi folks ,
    I have a unique requirement as follow.
    I have created an VIEW , which is given in the Download WEB ADI integrator defintion.
    I am trying to query this view based in few search conditions thoughr a CO code. I am not used any time loading the Query in the bne_stored_sql table to achieve such funcaitonality.
    Please folks any inputs on this would be greatly appricaited.
    Thanks and Regards
    Raghu

    Hi,
    I am creating the layout for a sales order which will be send to a customer.
    In that order the customer can see the payment conditions.
    It should look like this:
    net price: 1000,00 EUR
    19,00% taxes: 190,00 EUR
    gross price: 1190,00 EUR                          
    payment conditions:
    payable within 30 days net: 1190,00 EUR
    payable within 14 days with discount of 2 %: 1166,20 EUR
    to get the bold marked digits I need to have access on the following tables:
    OCTG and CDC1
    In the OCTG table I get the days (in this example 30)
    In the CDC1 table I get the days of cash discount and the percentage (in this example 14 and 2)
    but in the sales order layout in PLD only the OCTG table is shown when I create a database field and the CDC1 table isn't.
    So what can I do to get this?

  • How to hide some variables on variables screen in web report (in WAD)

    I need to hide some optional variables (not all of them) on variables screen in web template.
    Hiding the whole selection screen is not an option, since users have to populate other variables and some variables are mandatory.
    Web template is based on a query that can be run in BEx Analyzer by superusers - and there they need all variables. I want to use the same query both in BEx Analyzer for superusers and on the Portal for regular users. For portal version though I need to hide some of the variables on the selection screen. Is it possible at all?
    I would like to avoid creating two separate queries - one for Analyzer and one for Portal.

    if the variables are optional and mandatory both avaialble
    then there is no chance that u can hide them
    the only option is to create a save as QUERY and remove those variable.
    it is not possible to just hide the variable screen...
    if u hv used they will be displayed....
    if u dont want it dont use it...
    and if really using another query is not advisable as u said
    the only thing i can say is that... try to interact with ur security person
    ask him u need to create several authorization objects for several variables
    if that is possible
    let him create those
    assign those specific authorization object to specific user id
    use it for specific variables u need
    tat way super users with specaial authorization can acess the same query and can see specific variables
    regular users withouts authorization of variables can see rest of variables.

  • How to add dll library to application?

    I start programmed the CVI a few weeks ago and I have a little problem. I must make an application layer for profibus master device. However I total do not know how to add dynamic library to program, because in another way I get the error: undefined symbol. I know that it very trivial, but I cannot find solution. I have a lib file and also I include file about device, but I still get the error – undefined symbol – can you help me?
    Thanks very much for any advice or help

    Dear laszku,
    Are you looking for solutions to connect your CVI application with PLC? Because there are also solutions for that which are easy to use, and to implement with CVI.
    If you want to use your DLLs, there are some on-line help, how to import them in CVI.
    Basicaly there are two different method to import DLLs:
    - static import, when you import the library in your CVI project. The dll will be loaded when the exe starts running. If there is an issue to load the library, you'll be able to get the error at compilation time.
    - dynamic dll import, when you load the library at run-time. With this, you get the flexibility to control, when will be the dll linked to your exe in the memory, while running. The disadvantage is, you'll get errors only at run-time.
    I recommend you some of our on-line tutorial, how to load DLL into your application in CVI:
    CVI Help: Loading Dlls - This says: You cannot import DLLs directly into your project. You need to create DLL Import Library, which can be imported into your project.
    To do so, look at this knowledge base: Creating Import Libraries for a DLL in LabWindows/CVI
    You might get answers for your following questions at this FAQ page:
    FAQ: Using Dynamic Link Libraries with LabWindows/CVI
    Some help sites:
    Rules for Using DLL Files
    Linking to Functions Defined in a DLL From LabWindows/CVI
    If you need dynamic linkink, you can get example code with this site:
    How Can I Access DLL Functions in a LabWindows/CVI Program Without Including the Import Library in t...
    I hope, I could help you to find the way how to import DLL libraries.
    If you still couldn't solve the error after studying the links, please provide me more information, where, which symbol is missing, and also the full error message.
    The error you get, can be caused by the linker or pre-compiler also, which doesn't find the symbol you requested. Please check the path of your library and dll also.
    Best Regards,
    Tamas Szekely
    Applications Engineer
    National Instruments

Maybe you are looking for