How to change property file contents during run time?

Hi everyone. First post so go easy on me please.
I have a couple of properties that I want to read from a from a file. To achieve this I simply use:
ResourceBundle.getBundle("my.package.MyItems").getString("MyProperty");
This works like a wonder. The problem is, i want to change the property "MyProperty" during runtime. I've found the properties file (MyItems.properties) inside weblogic, but if a change its contents it does not reflect in the application.
I can come up with a couple of justifications:
* I'm not looking in the right folder/changing the wrong file in the server;
* Weblogic caches the properties file, meaning that I have to redeploy the project (defeating the purpose of actually having a properties file).
Can anyone help with this one?
[EDIT] Forgot important info:
* JDeveloper 11.1.1.4
* Weblogic 11.3 (not 100% sure)
* Both JDev and WebLogic running on Windows 7 64 bits
Thank you in advance!
Best Regards
J. Peixoto
Edited by: 868634 on Jul 12, 2011 9:37 AM
Edited by: 868634 on Jul 12, 2011 10:21 AM
JDeveloper 11.1.1.4, not 3

I tried it all.
Just an explanation of my context.
I have 1 application with 2 projects in it. First project is called "CommonUI_ViewController" and the second one "FO_ViewController".
The properties file I'm trying to change is located inside "CommonUI_ViewController", in package "PropertiesConfig" and the file is called "PhaseListener.properties".
"FO_ViewController" is dependent on "CommonUI_ViewController". When I run "FO_ViewController" the integrated weblogic server log shows this (among other things):
[10:25:55 AM] Wrote Web Application Module to D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\FO_ViewControllerWebApp.war
[10:25:57 AM] Wrote Web Application Module to D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\CommonUI_ViewControllerWebApp.war
Note: both lines above point to folders. "FO_ViewControllerWebApp.war" and "CommonUI_ViewControllerWebApp.war" are NOT war files, but folders that have that name.
I tried changing the properties file in the following locations:
* D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\FO_ViewControllerWebApp.war\WEB-INF\lib\adflibSPVCommonUI.jar > PropertiesConfig\PhaseListener.properties;
* D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\CommonUI_ViewControllerWebApp.war\WEB-INF\lib\adflibSPVCommonUI.jar > PropertiesConfig\PhaseListener.properties;
* D:\JDeveloper\dump\system11.1.1.4.37.59.23\o.j2ee\drs\SPV_BPM\CommonUI_ViewControllerWebApp.war\WEB-INF\classes\PropertiesConfig\PhaseListener.properties (no need to open any jar/war to get to this one).
I changed all these files with different values but no change was shown in the application (using the method in the previous post).
I believe that I'm still doing something wrong :/
Thank you for your help so far vinod_t_krishnan!
J. Peixoto

Similar Messages

  • How to hide the Parameter field during Run time?

    Hi,
    How to hide the Parameter field during Run time?
    I have a parameter field which behaves differently depending on the User logged in.
    I am using reports 10G
    For ex: I have 3 field created in JSP
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user = 'SUPER show all the parameter
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user is 'GATEKEEPER" Just show
    PROVIDER
    FROM DATE
    END DATE
    Can I do that?
    Please help
    Thanks.
    KK

    hi, i'm not familiar much with JSP. but i think workaround is to create two window one which have 4 fields and the other which have 3. if user is SUPER then call the first screen otherwise if user is GATEKEEPER then call the second screen.

  • How to change the view criteria at run time for af:query

    Hi,
    I've a usecase where I need to change the view criteria of the af:query at run time.
    Use case:
    =======
    1) Consider a check box (Show Emps Under Dept 10) in the query panel when user selects and clicks 'Search' button should show the employees under dept 10. If user searches without selecting the check box, the results should show all the employees in all the departments.
    2) I need to have a check box always in the query panel. Its mandatory.
    The way I implemented:
    ==============
    1) Created a transient variable 'Show Emps Under Dept 10' in the EmployeeVO and also created a bind variable bind_DeptNo.
    2) Create a view criteria 'AllEmployees' which has only the transient attribute as the view criteria item and whose value set to 'false' by default.
    3) Created another view criteria 'EmpUnderDept' which has 'DepartmentId' as the view criteria item and whose value set to the bind variable 'bind_DeptNo'.
    4) Dropped the view criteria 'EmpUnderDept' as the 'af:query' panel in the jspx page.
    5) Overridden the queryListener as '#{EmpBean.empSearch}'
    6) Has the below code in the empSearch method as below. When user selects the check box, applying the other criteria 'EmpUnderDept' and setting the bind variable to '10'.
    public void empSearch(QueryEvent queryEvent) {
    // Add event code here...
    QueryDescriptor queryDesc = (QueryDescriptor) queryEvent.getDescriptor();
    ConjunctionCriterion conCrit = queryDesc.getConjunctionCriterion();
    List<Criterion> criterionList = conCrit.getCriterionList();
    List criterionValues = new ArrayList();
    Object criteriaValue = null;
    int criteriaNo = 0;
    DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    FacesContext facesContext = FacesContext.getCurrentInstance();
    for (Criterion criterion : criterionList) {
    AttributeDescriptor attrDescriptor = ((AttributeCriterion)criterion).getAttribute();
    System.out.println("============== attrDescriptor.getName() =================== " + attrDescriptor.getName());
    criteriaValue = ((AttributeCriterion)criterion).getValues().get(0);
    if(criteriaNo==0) {
    Boolean val = (Boolean) ((AttributeCriterion)criterion).getValues().get(0);
    if (val.equals(true)) {
    OperationBinding method = (OperationBinding) ADFUtil.findOperation("ExecuteWithParams");
    if(method!=null) {
    Map params = method.getParamsMap();
    //params.put(key, value)
    method.getParamsMap().put("bind_DeptId", 10L);
    method.execute();
    ADFUtil.invokeMethodExpression( "#{bindings.EmpUnderDeptCriteiaQuery.processQuery}", queryEvent);
    } else {
    //ADFUtil.invokeEL("#{bindings.ExecuteWithParams.execute}");
    ADFUtil.invokeMethodExpression( "#{bindings.AllEmployeesCriteriaQuery.processQuery}", queryEvent);
    But this approach is not working and its always showing all the employees in all the departments.
    Please let me know if there is a way to change the view criteria at run time depending on the values set at run time for one of the view criteria items.
    JDev version am using is '11.1.1.5'
    Thanks,
    Lakshman

    Hi Shay,
    It worked for me without overriding the executeQuery() method in the ViewImpl.java.
    Instead of creating 2 view criteria, I created only one which has both transient variable and the DepartmentId = <bind_DeptId>. With the above code, it worked properly. Now I am using only one view criteria.
    Thank you.

  • How to change dynamically text label at run time in the forms

    Hi,
    I am having a form in which i want to change the text label dynamically. I mean when a certain condition match then text label should be change and when condition does not match then the text label should reamin as it is in the same form.
    plz help
    thanks in advance
    azhar

    Hi,
    Use this code to change the label at run time.
    set_item_property('deptno',prompt_text,'pagal dept');
    Prompt_text is used for changing label at run time.

  • Help please - how can i change a file extension at run time

    hi all
    i have a question about file created on the run. for instance, if i need to create a file initially with a an extension of '.in'. and there are some processes writing data to it, and after the file is written. i need to change it to some thing like '.out'. is it possible to do this? can u please provide some samples if you have any solution or suggestion. thanks.

    do u have the links of these tutorials?IO tutorials...
    http://java.sun.com/docs/books/tutorial/essential/io/index.html

  • How to Test Cliams Work Flow during run time in SWDD Tcode

    Hi Gurus,
    I want to test my Claim Work Flow(WS99900044) in SWDD Tcode by Hard coding values to Work Flow Container Elements. How can I do this, kindly pls advice me.

    I want to test my Claim Work Flow(WS99900044) in SWDD Tcode by
    Hard coding values to Work Flow Container Elements
    you must be aware of execute button in the same txn SWDD, being a workflow designer.......

  • How to change the variable value at run time in logical column in RPD

    for e.g..
    i have used a session variable in logical column in rpd in case statement. now in dashboard prompt i am using that variable to store data which user is passing but the data captured is not getting reflected in the logical column.
    its been always populated with the default value passed through the initilization block..

    resolved myself

  • How to Hide the Parameter field at run time....

    Hi,
    I have a parameter field which behaves differently depending on the User logged in.
    It has the LOV coming from following SQL.
    SELECT customer_name FROM Cust_mast;
    If the user = 'INTERNAL' then the Where clause will be
    WHERE cust_id in('DELL', 'SBC', 'BANK')
    Else there will be no WHERE clause or the parameter field
    should be hidden in the parameter form.
    So my questions are:
    1) How to hide the Parameter field during Run time?
    OR OR OR
    2) How to change the LOV select statement during Run time?
    Thanks.
    Ram.

    Hi Ram,
    Is there any way to play with the sql query SELECT using DECODE ?I'm not sure of this part, maybe someone else can suggest a way.
    However, what you want can be done in 2 other ways:
    1. Build 2 reports. Both reports will just be duplicates of each other, only difference being that the 'LoV where clause' will be different. Now you can fire the appropriate report in many ways. For example, if the customer is alreay logged inside your custom application, and therefore you already know whether the user is internal of external, you can design your button or link which launches the report to contain logic such that one of the 2 reports is fired depending on who the user is.
    1. Use a JSP parameter form, not a paper parameter form In this case, just build an HTML parameter form in the web source of your report. Use Java logic to populate the LoV drop-down list. When you have to launch the final report, just launch the paper-layout of the report. For example (you will have to modify this):
    <form action="http://machine:port/reports/rwservlet?report=ParamForm.jsp+..." name="First" method="post">
    <select name="selected_customer" onChange="First.submit()" >
    <option value="">Choose a Customer Name
    <rw:foreach id="G_cust_id" src="G_cust_id">
         <rw:getValue id="myCustId" src="CUSTOMER_ID"/>
    <rw:getValue id="myCustName" src="CUSTOMER_NAME"/>
    <option value="<%=myCustId%>"><%=myCustName%>
    </rw:foreach>
    </select>
    </form>
    In the code above, you will have to make sure that your report's data model defines 2 CUSTOMER_ID's (like CUSTOMER_ID_INT and CUSTOMER_ID_EXT). These 2 will be internal and external Cust ID's. Use Java logic to show one of them.
    Navneet.

  • In ABAP How to locate an Input file  from a Directory during run time

    I'm loading data from a flat file(text file) into SAP thru BDC programs. All my input files are present in Application server.How to locate an Input file in a directory during run time to process BDC programs programmatically. Are there any in-built functions?Provided me some sample code or any method of doing the same.

    Hello Murali,
    you should ask this question in the ABAP forum.
    Regards
    Gregor

  • How to change table of content font in captivate 6

    Hi There,
    Can somebody please suggest me how to change table of Content Text font English to Arabic in Captivate 6 and which font supports Arabic language.
    Please refer below image, highlighted text font should be changed.
    Looking forward for help.
    Thanks,
    Srikanth

    The weird sliding navigation is Apples pride and joy!
    That TOC allows you to slide between chapters, sections and pages.
    iBooks Authjor was designed to do what it does and what Apple wanted it to do.
    Some things can be changed during the books production,  but the " weird navigation"  is not something you can change to do what you want.
    iBooks Author is does not produce ePubs.. at least not as "ePub" is known from Pages, inDesign etc,.
    If you want what is available in ePubs.. then iBooks Author is not the application to produce it.
    You could drag a section page above chapter on and create an index type page using book marks for links - but whats the point? 
    People using iPads and familiar with iBooksAuthors special way of book presentation.. are quite happy its so easy to use.

  • How to convert Property files into Java Objects.. help needed asap....

    Hi..
    I am currently working on Internationalization. I have created property files for the textual content and using PropertyResourceBundles. Now I want to use ListResourceBundles. So what I want to know is..
    How to convert Property files into Java Objects.. I think Orielly(in their book on Internationalization) has given an utitlity for doing this. But I did not get a chance to look into that. If anyone has come across this same issue, can you please help me and send the code sample on how to do this..
    TIA,
    CK

    Hi Mlk...
    Thanks for all your help and suggestions. I am currently working on a Utility Class that has to convert a properties file into an Object[][].
    This will be used in ListResourceBundle.
    wtfamidoing<i>[0] = currentKey ;
    wtfamidoing<i>[1] = currentValue ;I am getting a compilation error at these lines..(Syntax error)
    If you can help me.. I really appreciate that..
    TIA,
    CK

  • Opening Another Flash File during Run Time

    I know, this is too easy. How do I open a Flash.exe file
    during run time? I know the code below is wrong but some insert the
    correction?
    open_btn.onRelease = function () {
    play("C:\Documents and Settings\GameOfficeFlow.exe");}
    Forever in your debt,
    Mike

    play() is a timeline command.
    I don't think you can have Flash load/play an exe file, but
    wait awhile and see if someone else knows better on that one. You
    can have it load/play an swf version of a Flash file though.

  • How to use property file - sql query define in property file

    Hi All,
    Anybody please tell me how to use property file.
    I have placed sql query in propery file and I have to access this in my file.
    well so far this is my code but don't know how to implement in the following ...
    pstmt = con.prepareStatement("select * from registration where username=?");
    instead of writting the query I want to use the property file.
    so far I have developed the following code...
    FileInputStream fis = new FileInputStream("querysql.property");
    Properties dbProp = new Properties();
    dbProp.load(fis);is the code correct... or is there another way to access property file
    Please help.
    please reply soon....
    Thanks

    Before answering, check if it's already been done here http://www.jguru.com/forums/view.jsp?EID=1304182

  • Reading from a file. How to ask the user for file name at run time????

    I have the code to read from a file but my problem is how to prompt the user for the file name at run time.
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.util.InputMismatchException;
    import java.util.Scanner;
    public class FileRead {
        public static void main(String args[]) {
            Scanner scan = null;
            File file = new File("Results.txt");
            String number;
            try {
                scan = new Scanner(file);
                while (scan.hasNext()){
                number = scan.next();
                System.out.println(number);}
            catch (FileNotFoundException ex1){
                System.out.println("No such file");
            catch (IllegalStateException ex2){
                System.out.println("Did you close the read by mistake");
            catch (InputMismatchException ex){
                System.out.println("File structure incorrect");
            finally{
                scan.close();}
    }Any hints would be greatly appreciated. Thank you in advance

    I have read through some of the tutorials that you have directed me too and they are very useful, thank you. however there are still a few things that i am not clear about. I am using net beans 5.0 I have placed a text file named Results.txt into the project at the root so the program can view it.
    When I use the code that you provided me with, does it matter where the file is, or will it look through everywhere on the hard drive to find a match?
    This code compiles but at run time it comes up with this error
    run-single:
    java.lang.NoClassDefFoundError: NamedFile
    Exception in thread "main"
    Java Result: 1
    BUILD SUCCESSFUL (total time: 3 seconds)
    import java.util.Scanner;
    import java.io.*;
    class NamedFileInput
      public static void main (String[] args) throws IOException
        int num, square;   
        // this Scanner is used to read what the user enters
        Scanner user = new Scanner( System.in );
        String  fileName;
        System.out.print("File Name: ");
        fileName = user.nextLine().trim();
        File file = new File( fileName );     // create a File object
        // this Scanner is used to read from the file
        Scanner scan = new Scanner( file );     
        while( scan.hasNextInt() )   // is there more data to process?
          num = scan.nextInt();
          square = num * num ;     
          System.out.println("The square of " + num + " is " + square);
    }his is the code that i used. It is the same as the code you posted for me (on chapter 23 I/O using Scanner and PrintStream) Sorry im just really stuck on this!!

  • My Prompt back ground colour changes during run time in Client / Server Env

    <p>Dear Friends, </p>
    <p> My Prompt of text items are changing its back ground colour according to the Text item's back colour during runtime. This doesn't look good. My look and feel of my application gets spoiled due to this. I tried with Visual Attribute (both prompt & Text item) but of no use. I don't want to use text label as I want to change the prompt during run time. Please help me. </p>
    <p> Form during Design time </p>
    <IMG SRC="C:\Documents and Settings\Administrator\My Documents\My Pictures\myform1.jpg"></IMG>
    <p>Form during Runtime </p>
    <IMG SRC="C:\Documents and Settings\Administrator\My Documents\My Pictures\myform2.jpg"></IMG>
    <p> Thank you.
    Regards,</p>
    <p>Senthil .A. Perumal.</p>
    <p>My version of forms is Forms [32 Bit] Version 6.0.8.8.0 (Production).
    </p>

    Dear Kevin,
    Yes I agree with you, but in my case as this application supports bilingual (English & Arabic), I want to change the prompt of the text at run time. Can I change the text of boilerplate text at runtime?
    Thank you for your reply.
    Regards,
    Senthil .A. Perumal.

Maybe you are looking for

  • RFC_FAILURE affects Connection Pool

    Using VB.NET (2003) with .Net Connector 2.0. An intermittent problem causes a RFC Call to fail, and an exception is raised in the .NET code. The Exception message is:      See RFC trace file or SAP system log for more details The Trace file shows: ER

  • Why aren't my CSS and div tag boxes displaying the background images I'm plugging in?

    I'm using the CSS dialog boxes to places images via the background image option into my dreamweaver site. Everything looks fine in dreamweaver but when I view it any of the browsers, two of the images I've place as div tag background images don't wor

  • Default Applications

    Newbie question here - how do I change the default application to start when I open a file in Finder? I've installed NeoOffice and want it to be the default application for .doc files. Right now when I open a .doc file in Finder, it starts the TextEd

  • Workflow with RAW files iPhoto iOS

    I shoot in Nikon RAW (.nef) and want to use my camera connection kit and new iPad to do a first pass on editing/deleting photos before I pass them to my Mac. I tried shooting a few photos in raw and then edited them but when I sent them via the "Send

  • How can I save zoom setting for a DOCUMENT so it opens at that setting?

    I find an optimal zoom setting for a document I'd like to use (say 42%) and want the document to open at that setting.  I save the document with File>Save Copy.  However when I open the document, it opens at the DEFAULT zoom setting set in the Prefer