Changing properties file value without redploying code

Hi,
If I use properties file colors.properties in my web dynpro application for storing key-value pairs as
color1=RED
color2=BLUE
color3=GREEN
is it possible to change colors.properties  in future to show new colors
color1=ORANGE
color2=YELLOW
color3=PURPLE
without redeploying code ? through Visual Admin / Config tool  ?
If not, what is the other way to avoid hard coded values in Web Dynpro Java ?
Thanks !!

Hi,
Its can be achieved using the WDConfiguration API of Java Webdynpro.
The details are given in the blog below;
/people/daniel.wirbser/blog/2005/09/28/properties-files-in-web-dynpro-applications-how-to-use-the-wdconfiguration-api
Also for changing this properties all we need to do is from Visual Administrator/Config tool(changing from config tool will need a re-start)
Proceed as follows to start the Visual Administrator:
       1.      Start the Visual Administrator by double-clicking on file go.bat in the file directory C:\usr\sap\<System ID>\<System Number>\j2ee\admin, in which the J2EE Engine is installed. For example, the background file can be stored in directory C:\usr\sap\J2E\JC00\j2ee\admin.
You can find a description of the Visual Administrator in the SAP Library under SAP NetWeaver u00AE Application Platform (SAP Web Application Server) u00AE J2EE Technology in the SAPWeb Application Server u00AE Administration Guide u00AE Server Administration u00AE SAP J2EE Engine Administration Tools u00AE Visual Administrator.
       2.      Navigate to directory Server 0/Services/ Configuration Adapter / webdynpro/ <sap.com/Your namespace>/ <Your Web dynpro application>
       3.      Select the property file
       4.      The Visual Administrator opens so that you can edit the values. You can change or redefine the parameters and check the option "Use Custom " to take the new value.
Thats all.
One more URL is
http://help.sap.com/saphelp_nw04/helpdata/en/09/a4d6a674bc1d4a9e74abf81bed3ef6/frameset.htm
Regards
Priya

Similar Messages

  • How to identify a change on parameters value using match code

    Hi everybody,
    I would like to know if it's possible to identify automatically a change on a parameters using match code.
    For example : In my wiew i set XXX in  my parameters, so i execute XXX treatment. Now if i change this value to YYY, i would like to treat the YYY treatment without press enter key.
    My requirement is the following : According to the values filled in this parameters, i need to display different views in my WD application. So when this value changes, it's neccesary to modify the displayed views.
    Does anybody can help me on this problem ?
    Thanks in advance.

    Hi,
    i think ,when you start a application with application parameters your first requirement is realized. However , the second requirement need more clarity.
    When you start a application with parameter XXX, the application is displaying a view-X. How and who will change the value of XXX. Without triggering a roundtrip to server you cannot check the value if it is changed and on top of it, you can not bring new view assembly  So keep this in mind and design your application..

  • How to use .properties files in Webdynpro Java code?

    Hi all,
      I want to use a logon.properties file when I initial a JCO connection pool in my webdynpro DC (JCO.addClientPool()),but  I found when I deployed this DC to the server, it always giv e me an FileNotFoundException. So I donot know how to deploy a .properties file to the server and how to access this file in my Java code?
    Thans and Best regards
    Deyang

    Hi,
    1) put .properties file to your packege under src\packages folder (src\packages\com\sdn\properties\jco.properties)
    2) load property:
         final InputStream is = getClass().getClassLoader().getResourceAsStream("com/sdn/properties/jco.properties");
         final Properties properties = new Properties();
         try
              properties.load(is);
         catch(Exception e)
              wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);
    Regatds Maxim R.

  • Accessing properties file value in event handler in OIM11gR2

    Hi,
    Can i store the bolded values in below code in a propery file and call them. I am implementing this code in Post event handler.
         logger.debug("Function::Client Initiate: Initializing OIM client");
         String ctxFactory = "weblogic.jndi.WLInitialContextFactory";
         String serverURL = "t3://host:port";
         String username = "oim_user";
         String password = "some_password";
    String authConfigLocCl="C:/OIM11g/Oracle_IDM1/designconsole/config/authwl.conf";
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL,ctxFactory);
         env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, serverURL);
         logger.debug("Function::Client Initiate: Creating OIM client");
         System.setProperty("java.security.auth.login.config",authConfigLoc);
         System.setProperty("APPSERVER_TYPE", "wls");
         oimClient = new OIMClient(env);

    Another option to get OIM credentails dynamically using CSF map
    Try something like below code
    oracle.security.jps.JpsContext ctx;
    final oracle.security.jps.service.credstore.CredentialStore cs;
    oracle.security.jps.service.credstore.CredentialMap cmap;
    oracle.security.jps.service.credstore.Credential cred;
    oracle.security.jps.service.credstore.PasswordCredential pcred;
    ctx = oracle.security.jps.JpsContextFactory.getContextFactory().getContext();
    cs = ctx.getServiceInstance(oracle.security.jps.service.credstore.CredentialStore.class);
    final String mymapName="oracle.oim.sysadminMap";
    final String mykeyName="sysadmin";
    cred = AccessController.doPrivileged(new PrivilegedExceptionAction<Credential>() {
    public Credential run() throws CredStoreException {
    return cs.getCredential(mymapName, mykeyName);
    }, null);
    String oimUserName = "";
    String oimPassword = "";
    String oimURL = "";
    if (cred instanceof oracle.security.jps.service.credstore.PasswordCredential)
    pcred = (oracle.security.jps.service.credstore.PasswordCredential)cred;
    char[] p = pcred.getPassword();
    oimUserName = pcred.getName();
    oimPassword = new String(p);
    }

  • About properties file values in descendind order

    hi,
    I have one query . I have one properties file ab.txt in that
    user       marks
    a    =           1
    b     =           5
    c      =           8
    here my query is  now i want to display marks in descendindgorder
    can any one give idea about this one

    Fine that it works for you, but please keep in mind: writing raw java code in a JSP file is a bad practice. Whenever you need to do so, your design is flawed. You should be using tablibs (JSTL, JSF, etc), EL and/or Java classes (servlets, beans, etc).
    You´ve been warned.

  • How to change properties of a TableCell over Code ?

    Hy all,
    i want to enable a cell of the selected row over code.
    How can i do this ?
    I dont know, how to get the UI-Element table of my view over code.
    I have read the API and have seen all the method to change the properties, but not found the method to get any of my UI-Elements of the actual view.
    Is there any method to get or browse all the UI-Elements of the view ?
    Have anyone a code-example to get a UI-Element of a view ?
    Thanks for help.
    by Jürgen

    Hy Valery,
    my scenario is to enable a Button or LinkToURL UI-Element in a table cell of the selected row. The data in the table are mapped from a node und the Button/LinkToURL Element was insertet by visual editor with property enable = false.
    I have a action onLeadSelection to get the parameters of the selected row to build the right URL.
    Do I have access in the action to the wdDoModifyView-Method to change the property ?
    How can i change the cell-enable-property of the selected row ?
    I can get the table, the array of tablecolumns and an iterator over the table. But i have not found a method
    to get the column like table.getColumn(XXX).
    I have read the IDWTable API with the following text:
      "Table columns are defined by aggregating TableColumn
       objects. Each table column has a table cell editor.
       Every property of the table cell editor may be bound
       either
          to an attribute of the context node X, or
          to a context root attribute.
    Now I am a little bit confused. Do I need a value attribute "URL" in my model node?
    But this should not solve my problem to enable a Cell of a table, or ?
    Thanks for help.
    Jürgen

  • HT1918 How can I change Credit Card information without security code?

    I lost my credit card and cancelled it, so I don't have the code, and just want to use another one. iTunes won't let me change credit cards without first entering the security code of my old one, is there anything I can do?

    You can change your information to a different card here:
    Change or remove your payment information from your iTunes Store account (Apple ID) - Apple Support

  • Changing art file names without reimporting?

    I have a book project just completed with about 150 pieces of art imported ... the publisher would like the art file names appended with the book title on them. I can do that easily enough in Bridge, but is there a way to accomplish this within InDesign so all 150 won't show up as missing and have to be reimported? Thanks!

    Hello,
    Here's a solution I used for myself in a similar situation to yours. The approach is similar to what Jarek suggests in #1. This script should relink all graphics including anchored/inline graphics and multiple instances of the same link. It puts the links in the format listed below (which you can change). Assuming your document name is "test.indd":
    links are named:
    test_originalNameofLink.ext
    Lindsay
    //set active document
    var doc = app.activeDocument;
    //set document name
    var docName = doc.name.split(".")[0];
    //set destination folder
    var destFolder = "~/Desktop/test/";
    //count links
    linkCount = doc.links.length;
    //loop through links
    for (i=linkCount-1; i>=0; i--) {
        //get current link name
         var currentLink = doc.links[i];
         var clFullName = currentLink.name;
         var clFullNameCount = clFullName.length;
         var clName = clFullName.split(".")[0];
         //get current link file path
         var clFilePath = currentLink.filePath;
         var clFilePathCount = clFilePath.length;
         var clFilePathSplitList = clFilePath.split (":");//<--- the colon is specific to mac file paths change to / for windows
         var clFilePathListCount = clFilePathSplitList.length;
         var clFileName = clFilePathSplitList[clFilePathListCount-1];
         var clFileNameCount = clFileName.length;
         //check for link status
         if (currentLink.status == LinkStatus.NORMAL) {
                 //set filename without document name
                 var clNameNoPrefix = clFullName;
                 //set relink destination folder & filename
                 var reLinkDest = destFolder + docName + "_" + clNameNoPrefix;
                 //set relink destination file
                 var relinkDestFile = File (reLinkDest);
                 //check if link is named and relinked
                 if (!relinkDestFile.exists) {
                     //relink file
                     currentLink.copyLink (new File (reLinkDest));
                     //relink to already existing file
                     } else if (reLinkDest != clFilePath && relinkDestFile.exists) {
                         //relink file
                        currentLink.relink (relinkDestFile);
                  //alert user link is inaccessible
                 } else if (currentLink.status == LinkStatus.LINK_INACCESSIBLE || currentLink.status == LinkStatus.LINK_MISSING || currentLink.status == LinkStatus.LINK_OUT_OF_DATE) {
                     //alert user
                     alert (clFullName + "\n\nThis link is missing, out of date, or inaccessible and can not be updated.")
    alert ("Done.");

  • Screen values without ok code

    Hi All,
    I have to get values stored on screen without using ok code, i.e. pressing enter or any other key.
    Is it possible?If yes Can you please guide me how to get the value?
    Thanks in advance
    Regards,
    Rakesh.

    Hi Rakesh,
    Rather than using a native matchcode (using table joins or using a matchcode exit in ABAP) you could just add a module CUSTOMER_LOOKUP and process it ON VALUE-REQUEST in the flow logic of your screen.  So it would look something like this:
    PROCESS BEFORE OUTPUT.
    PROCESS AFTER INPUT.
    PROCESS ON VALUE-REQUEST.
      FIELD vbak-kunnr MODULE customer_lookup.
    In this module, you could extract the values for the sales org., dist. chan., and division and then call a popup screen (using a search help function module), passing it the values.
    Hope that helps,
    Brad

  • Where to place ResourceBundle properties files

    I have written a servlet that will serve content in different languages
    depending on the user's browser settings.
    The problem is my servlet cannot find the resource bundle properties fiel
    even though I put it in the server classes directories.
    Namely:
    /weblogic/myserver/servletsclasses
    /weblogic/classes
    /weblogic/myserver/serverclasses
    Can anybody tell me where to put my resource bundle properties files??
    regards
    EM

    "Ee-Ming" == Ee-Ming Toh <[email protected]> writes:
    Ee-Ming> I have written a servlet that will serve content in different languages
    Ee-Ming> depending on the user's browser settings.
    Ee-Ming> The problem is my servlet cannot find the resource bundle properties fiel
    Ee-Ming> even though I put it in the server classes directories.
    Ee-Ming> Namely:
    Ee-Ming> /weblogic/myserver/servletsclasses
    Ee-Ming> /weblogic/classes
    Ee-Ming> /weblogic/myserver/serverclasses
    Ee-Ming> Can anybody tell me where to put my resource bundle properties files??
    First of all, it would be useful if we knew what version of WebLogic you're
    using. There's considerable differences between versions.
    In general, if you have a standard WAR structure, you're better off putting
    properties files in the "WEB-INF/classes" directory of your WAR structure. If
    you do that, you have a chance of being able to redeploy the changed properties
    files without having to restart the server.
    ===================================================================
    David M. Karr ; Java/J2EE/XML/Unix/C++
    [email protected] ; SCJP; SCWCD

  • Fuego.io.properties file

    I would like to know how to implement the properties file.I have the code for the properties file(key,value pairs defined) .In a process ,I have a global automatic activity where I am getting the values for the keys in properties file .My question is under what activity do I need to write the code for the properties file.How do I hook it up with the process that is using this properties file.Please help me as I am new to this tool.

    As per my understanding about your question let me reply for this.
    You can access the property file in any activity in the process. if the property values need to be accessed across the process then write the code once and assign the value to some instance variable where you dont need to write the code every where.
    Let me know if you have some specific scenario

  • Changing values in a properties file

    Hi,
    I'm working in a Struts environment and I am trying to open a .properties file in my WEB-INF/classes/ (*.properties) directory and allow the user to change those values and write them back.
    I access the properties by pulling them out in a Map:
    Locale locale = LocaleContextHolder.getLocale();
             ResourceBundle resBundle = ResourceBundle.getBundle(SP_PROPERTIES_FILE,locale);
             Enumeration propertyKeys = resBundle.getKeys();
              Map spProperties = new HashMap();
             while (propertyKeys.hasMoreElements()) {
                 String key = (String) propertyKeys.nextElement();
                 if(key != null){
                      key = key.trim();
                 String value = resBundle.getString(key);
                 if(value != null ){
                      value = value.trim();
                 spProperties.put(key, value);
             I then change the values depending on their keys, but it is after this step I am unsure how perform the write back.
    Thanks,

    A ResourceBundle is a read-only object. It doesn't provide any methods for updating. If you want to allow your users to update the data, the code will have to update the underlying properties file. This also is impossible if your application server doesn't expand the application but runs it from a WAR or EAR archive.
    [Edit] And even at that, allowing users to update properties files in a multi-user environment is risky -- if two users update the file at the same time, it's easy to lose one of the updates.

  • How to change the profile value in the pl/sql code without making change in the database

    How to change the profile value in the pl/sql code without making change in the database.

    I have program ,where if the profiles 'printer and nunber of copies ' are set at the user level, by default when the report completes the O/p will be sent to the printer mentioned in the set-up. but what user wants is
    if these Profiles are set for the user running this program automatic printing should not be done.

  • Best approach to change values in .properties file dynamically

    Hi ,
    I am using Jdev 11.1.1.5 . I wanted to change the values used in .properties file (like say a fe email addresses which happen to be different for Test/Prod/Dev instances) dynamically using something like a deployment plan.
    One way to do the same is to include it in a shared libary and do a one -time deployment to the server.
    Are there any better ways like a deployment plan , which unfortunately I think can change values dynamically on for web.xml , weblogic.xml type of files.

    I am using a shared library which takes care of the cases mentioned above.

  • The charsetalias.properties file is gone in Firefox 4? Most web sites in Hong Kong use the Big5-HKSCS charset but declare the charset as Big5. Without charsetalias.properties, the encoding needs to be manually changed very often when viewing them.

    I have been defining Big5 as an alias of Big5-HKSCS in charsetalias.properties. This makes Firefox renders pages declared as "Big5" to be rendered in Big5-HKSCS instead. Big5-HKSCS is a standard published by the Hong Kong government because the Big5 charset does not contain many common Chinese characters used in Hong Kong. However, Big5-HKSCS is just an extension of Big5, so most (if not all) Chinese web sites in Hong Kong using Big5-HKSCS declare their pages to be in Big5 in the <meta> tag.
    I am now trying out Firefox 4 RC and found that the charsetalias.properties file is no longer there. So in order to read pages containing characters that are in Big5-HKSCS but not in Big5, I need to switch the encoding manually. This is extremely inconvenient. Can you consider bringing charsetalias.properties back?
    [http://groups.google.com/group/mozilla.dev.i18n/browse_thread/thread/415caa98a6246a00 Someone noticed this issue as well.]

    Here's the script I was working on.
    It determines the encoding of the site by checking a couple of different ways the meta tag can supply encodings. One way is to have a charset attribute on a meta tag, and the other way is to have a meta tag with http-equiv="content-type" and have charset= be part of the content attribute.
    (note: I think [https://developer.mozilla.org/en/DOM/document.characterSet document.characterSet()] might be a far more reliable way to detect encoding since it doesn't depend on the specific way the meta tag was written. But I haven't tested it.)
    Debugging messages showed that it could detect the specified encodings fine on the few test pages I was trying it on. The problem is in the way I change the encoding.
    It currently uses .setAttribute to attempt to modify the meta tags once it finds the encodings. Unfortunately, this doesn't change the selected encoding in Firefox. It doesn't affect the page source, either.
    I have to replace those setAttribute calls with something that will actually affect the selected encoding in Firefox.... but I'm not sure what would accomplish that.
    http://pastebin.com/Yt7fygXe
    Just a little warning, it's case- and whitespace-sensitive because I didn't get around to using regular expressions yet. So if a page says charset="BIG5", you'll probably need to make it uppercase in the script as well. Sorry, I'm lazy!
    Nonetheless, I ''hope'' this is a start...

Maybe you are looking for

  • ITunes and ROKR mobile phone - found a way of making it all work !fixed!

    I struggled for two evenings trying to get my daughters Christmas present working. iTunes and the Motorola ROKR phone would not exchange music files. What I quickly realised is that iTunes on the Motorola does not work as if it were a Window applicat

  • Mavericks Notes App not syncing with iCloud

    The notes.app stopped syncing with iCloud after installation of Mavericks for users with networked home folders.  Was previously working properly with Mountain Lion. Notes syncing is enabled in icloud preferences. Signing out of icloud and signing ba

  • I am unable to clear recent h istory in the Tools. The option is not accessible.

    The clear recent history option under Tools on the menu is not active. i cannot click on that option. It is in a gray faded font and i am unable to use it

  • Where is the Scheduler log file located?

    I'm trying to track down and diagnose this error in my scheduling/bursting: Error!! Could not deliver the output for Delivery channel: EMAIL.  Please check the Log for error details... But a search of my entire drive does not reveal any file with a .

  • Error:The specified criteria didn't result in any data".

    Hi, I am providing the details of the dimensions and facts · P&L · Invoice Date · Risk Region · AR Fact We have already created a presentation layer, CDW, with all the above mentioned Dimensions and Facts. While trying to create reports in Answers ba