Properties file specification

Hi,
I whant to internalize my project, but I cannot read from UTF-16 encoded file.
Must I use only charachters like \u1212 or can I use other unicode encodings?????
Please, help to solve this problem! I need your help!
Thanks a lot!:)
Best,
Aram.

I'm working with ResourceBundle. What do you mean with loader. I knnow that I can write/read every supported encoding with InputStreamReader/OutputStreamWriter. What is your loader??? Can you, please, send some links or explain it.
And what do you mean with native2ascii tool??? Does it java class or java program????
Can you send links for this too????
Thanks a lot!:)
Best,
Aram.

Similar Messages

  • Location of application-specific properties files

    I am using Tomcat 4.0.3 under WinXP Pro, and I am trying to get my
    application to "find" an application-specific properties file. I am having problems trying to determine which directory to put this file in.
    Here is the Java code I am using for this class:
    import java.util.Properties;
    import java.io.FileInputStream;
    public class ForumProperties extends Properties {
       private static final String DEFAULT_FILENAME = "/WEB-INF/classes/mystuff.properties";
       private static ForumProperties globalProps;
       private ForumProperties() {
       private ForumProperties(String fileName) throws Exception {
          this();
          load(new FileInputStream(fileName));
       public static ForumProperties getInstance() throws Exception {
          try {
             if (globalProps == null)
                globalProps = new ForumProperties(DEFAULT_FILENAME);
          } catch (Exception ex) {
             ex.printStackTrace(System.out);
             throw new Exception("Error loading properties file");
          return globalProps;
    }I have put the properties file in just about every directory I can think of to try and find out where it's supposed to be, but I can't get it to work. I can put the file into the "user.home" System property (which turns out to be C:\Documents and Settings\Administrator) and have it pick it up, but I would prefer to put the file into the path of the application.
    I have tried four different methods to load this file:
    1. load(new FileInputStream(fileName)); (same as above)
    2. load(Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName));
    3. load(this.getClassLoader().getResourceAsStream(fileName));
    4. load(getServletContext().getResourceAsStream(fileName));
    All of them fail for not finding the file except #4, but that's not the
    optimal solution as it requires a servlet context, which for "genericness of code reasons", I DON'T want to do.
    As an aside, I pulled the "java.class.path" from the System properties to see where it's pointing, and all it has in it is
    "<CATALINA_HOME>\bin\bootstrap.jar" with no other paths included.
    Is there an attribute or something in the server.xml or web.xml file I am forgetting to set, or another approach I should be taking?
    Bob

    See if this code fragment helps.
              String MAIN_FILE_PATH = "./BlueGnome/demos/Properties/DemoPropertiesFile.properties";
              java.net.URL url = ClassLoader.getSystemClassLoader().getResource(MAIN_FILE_PATH);
              System.out.println("PATH: resolved name = " + url);
              // Get the file.
              // We could just use FileInputStream here.  Then we would have
              // to provide a path that was meaningful to the system like
              //     c:\java\BlueGnome\demos\Properties\DemoPropertiesFile.properties
              // Doing it this way allows us to use generic directory
              // seperators and allows for it to search for the file using
              // the CLASSPATH.  That also allows for it to be in a jar file.
              java.io.InputStream is;
              is = ClassLoader.getSystemClassLoader().getResourceAsStream(MAIN_FILE_PATH);
              if (is == null)
                   throw new Exception("Resource File "
                        + MAIN_FILE_PATH + " not found.");
              aProperties.load(is);

  • [svn] 1978: Bug: vendors. properties file which is used in vendor specific login commands was not being read properly and as a result some login related error messages were not being displayed correctly .

    Revision: 1978
    Author: [email protected]
    Date: 2008-06-06 08:05:34 -0700 (Fri, 06 Jun 2008)
    Log Message:
    Bug: vendors.properties file which is used in vendor specific login commands was not being read properly and as a result some login related error messages were not being displayed correctly.
    QA: Yes - we need automated tests to make sure that errors.properties and vendors.properties in BlazeDS/LCDS are loaded properly.
    Doc: No
    Modified Paths:
    blazeds/branches/3.0.x/modules/common/src/java/flex/messaging/util/PropertyStringResource Loader.java
    blazeds/branches/3.0.x/modules/opt/src/jrun/flex/messaging/security/JRunLoginCommand.java
    blazeds/branches/3.0.x/modules/opt/src/tomcat/flex/messaging/security/TomcatLoginCommand. java

    I have a lot of grief with this version of Windows Media Player.
    It is very buggy and frustrating to use.
    I have my Music library on a QNAP NAS, which is as reliable as they come.
    System notifications make it not save changes.  It also does not do a good job of interpreting albums and artists from folders.  Changes to track names are not saved, nor are tracks moved to other albums, renamed albums, changes to genre, artist
    or date.  It separates and merges albums/tracks without sense or reason.  Some changes I've made up to 4 times, then closed WMP and re-started my machine to check if it has/hasn't saved the changes.  Often it has not.
    This is the first time I've used WMP in this capacity, and I do not recommend it.
    New service pack please.

  • Application specific properties file

    Hello
              Can any body help me how to build application specific properties file
              so that we can have independent application specific server with its own
              java class path environment.I read the procedure in beasys manuals but i
              could'nt understand clearly.
              Setting application-specific properties
              The weblogic.properties file is only accessible by WebLogic; that is,
              you can't add application-specific properties to the weblogic.properties
              file and expect that they will be read at startup time. However, you can
              set properties for your own application by creating a separate
              properties file. This file can be created and used in two ways:
              Put your application-specific properties file in the same directory as
              your weblogic.properties file. You can then use the following code to
              access the properties:
              Properties props = new Properties();
              String propertiesName = "myapp.properties";
              T3ServicesDef services =
              T3Services.getT3Services();
              String location =
              services.config().getProperty("weblogic.system.home") +
              java.io.File.separator + propertiesName;
              props =
              props.load(new DataInputStream(new FileInputStream(location)));
              Thanks in advance
              Ravi
              

    Hi, Ravi.
              I think I am "WeiG".
              Basically, you can not put your own properties on weblogic.properties. Every
              property in weblogic.properties managed by WLAS is pre-registered in WLAS
              internally. WLAS will print "Fund undefined property ...." messages for the
              un-registered property in weblogic.properties files.
              To use your application-specific properties, the paragraph you read suggests
              you create your own file, put it in $WL_HOME, and use the example code to
              read your own file.
              Hope it helps.
              Cheers - Wei
              Ravi <[email protected]> wrote in message
              news:[email protected]...
              > Hi Purdy
              >
              > Who is WeiG,can you tell me please
              >
              > Thanks
              > Ravi
              >
              > Cameron Purdy wrote:
              >
              > > I know that WeiG has answered this before ... try to ask Wei directly.
              > >
              > > --
              > >
              > > Cameron Purdy
              > > http://www.tangosol.com
              > >
              > > "Ravi" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > Hello
              > > >
              > > > Can any body help me how to build application specific properties file
              > > > so that we can have independent application specific server with its
              own
              > > > java class path environment.I read the procedure in beasys manuals but
              i
              > > > could'nt understand clearly.
              > > >
              > > > ************************
              > > > Setting application-specific properties
              > > > The weblogic.properties file is only accessible by WebLogic; that is,
              > > > you can't add application-specific properties to the
              weblogic.properties
              > > > file and expect that they will be read at startup time. However, you
              can
              > > > set properties for your own application by creating a separate
              > > > properties file. This file can be created and used in two ways:
              > > >
              > > > Put your application-specific properties file in the same directory as
              > > > your weblogic.properties file. You can then use the following code to
              > > > access the properties:
              > > >
              > > > Properties props = new Properties();
              > > > String propertiesName = "myapp.properties";
              > > >
              > > > T3ServicesDef services =
              > > > T3Services.getT3Services();
              > > > String location =
              > > > services.config().getProperty("weblogic.system.home") +
              > > > java.io.File.separator + propertiesName;
              > > > props =
              > > > props.load(new DataInputStream(new FileInputStream(location)));
              > > >
              > > > ****************************
              > > >
              > > >
              > > >
              > > >
              > > > Thanks in advance
              > > > Ravi
              > > >
              >
              

  • Problem in loading a Properties File

    Following is my program which is actually reading a Properties file from a specific location and saving it latter. The program is able to save the Properties file but gives NullPointerException while reading it back.
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.Map;
    import java.util.Properties;
    import java.util.Set;
    import com.server.config.ConfigurationException;
    import com.server.config.SimpleNetworkConfigurationManager;
    public class Test {
         private static final Properties DEFAULT_CONFIGURATION;
         private static final String CONFIGURATION_FILE = "config/server_config.cfg";
         protected Properties m_config;
         static {
              DEFAULT_CONFIGURATION = new Properties();
              DEFAULT_CONFIGURATION.setProperty("ServerName", "Utility Server");
              DEFAULT_CONFIGURATION.setProperty("Host", "localhost");
              DEFAULT_CONFIGURATION.setProperty("Port", "1100");
         public Test(){
              try {
                   loadConfiguration();
              } catch (ConfigurationException e) {
                   //TODO: Log error message
                   System.out.println("Could not load Configuration; Reason: "+e.getMessage());
                   this.m_config = new Properties();
                   this.m_config.putAll(DEFAULT_CONFIGURATION);
         public Map getAllConfigurationParameters() {
              return m_config;
         public Set getConfigurationKeys() {
              return m_config.keySet();
         public Object getValue(String configurationParameter) {
              return m_config.getProperty(configurationParameter);
         public void loadConfiguration() throws ConfigurationException{
              try {
                   this.m_config.load(new FileInputStream(CONFIGURATION_FILE));
              } catch (FileNotFoundException e) {
                   throw new ConfigurationException(e);
              } catch (IOException e) {
                   throw new ConfigurationException(e);
         public void saveConfiguration() throws ConfigurationException {
              FileOutputStream fos = null;
              try {
                   File file = new File(CONFIGURATION_FILE);
                   file.createNewFile();
                   fos = new FileOutputStream(file);
                   this.m_config.store(fos,"Utility Server Configuration");
              } catch (FileNotFoundException e) {
                   throw new ConfigurationException(e);
              } catch (IOException e) {
                   throw new ConfigurationException(e);
              }finally{
                   if (fos!=null){
                        try {
                             fos.close();
                        } catch (IOException e) {
                             //ignore
                        fos = null;
         public void setConfigurationParameters(Properties configurationParameters) {
              this.m_config = new Properties(configurationParameters);
         public String setConfigurationParameter(String param, String value) {
              return (String)this.m_config.setProperty(param, value);
         public static void main(String[] args) {
              Test configManager = new Test();
              try {
                   configManager.saveConfiguration();
              } catch (ConfigurationException e) {
                   e.printStackTrace();
    }The Exception is as follows:
    Exception in thread "main" java.lang.NullPointerException
         at Test.loadConfiguration(Test.java:52)
         at Test.<init>(Test.java:29)
         at Test.main(Test.java:92)
    Please help me. I am unable to understand why is it happening. May be that I am doing some silly mistake.

    dhirendra_logicon wrote:
    The Exception is as follows:
    Exception in thread "main" java.lang.NullPointerException
         at Test.loadConfiguration(Test.java:52)
         at Test.<init>(Test.java:29)
         at Test.main(Test.java:92)
    Please help me. I am unable to understand why is it happening. May be that I am doing some silly mistake.Well, obviously, m_config is null. You cannot call a method on a null value.

  • Application Properties file

    Hi,
    I have a java DC which should be able to read some application properties like
    mdm.servername
    mdm.repositoryname
    mdm.username
    I have tried using the ApplicationConfigHandler class in which I created a EAR and Web Module DC and when I run this web module dc as standalone, the properties file "sap.application.global.properties" gets loaded successfully.
    But when I call this webmodule Dc's method to load properties from a Java DC , all the properties are null.
    Is there any other way that I can load properties in java DC which can be modified without having to redeploy the java dc.
    Thanks
    MLS

    Hi
    Use [configuration services |https://help.sap.com/saphelp_nw04/helpdata/en/b8/aa343e32ff1033e10000000a114084/frameset.htm] in order to created application-specific properties that can be modified at run-time.
    Good luck,
    Ola

  • EJB project IDE build dos not include properties files

    We have property files also which we want included as part of the build process
    for EJB projects but if we use the IDE build it does not include them. We have
    to therefore export the IDE build and customize it to include *.properties like
    this
    <zip basedir="${dest.path}" zipfile="${ejb.outputJar}" encoding="UTF8"> <!-- JARs
    filenames are encoded UTF8 --> <zipfileset dir="${project.local.directory}" includes="*.properties"
    /> </zip>
    which causes a problem for us because the exported build file is specific to a
    user's local PC and cannot be used in a team environment.
    How can we have the IDE build include all the files within an EJB project i.e.
    include properties files also.

    Hey Jamie,
    Currently there is no support to include other .properties files into
    the internal build. There's a build.properties that you get as part of
    an EJB project which you could place your values into and use that as
    your template for your team based development and check that into your
    source control.
    If you'd really like to get gross and hack Workshop a little bit you
    could modify the default EJB project template to use your .properties
    file for every EJB project you create. This would then splat a copy of
    your .properties file into the root of the EJB project.
    To do that you'd go to {your BEAHOME}\workshop\templates and crack open
    the ejb-project.zip template zip file and merge your settings into the
    existing build.properties file. This has the same
    effect as replacing the .properties file after you've created your
    project only it keeps you from having to perform that step each time.
    The downside of this is that each person on your team would then have to
    update that template zip file in their workshop installation. (I'd make
    sure to backup the original template file before performing this
    activity so you can always go back to the original template).
    Hope this helps,
    -Michael
    Jamie wrote:
    We have property files also which we want included as part of the build process
    for EJB projects but if we use the IDE build it does not include them. We have
    to therefore export the IDE build and customize it to include *.properties like
    this
    <zip basedir="${dest.path}" zipfile="${ejb.outputJar}" encoding="UTF8"> <!-- JARs
    filenames are encoded UTF8 --> <zipfileset dir="${project.local.directory}" includes="*.properties"
    /> </zip>
    which causes a problem for us because the exported build file is specific to a
    user's local PC and cannot be used in a team environment.
    How can we have the IDE build include all the files within an EJB project i.e.
    include properties files also.

  • Weblogic Classpath setting error not able to pick the properties file

    Hi All,
    We are using a third party jar and create a java Web service on the top of that jar. This jar file need two configuration file .properties and .xml when we deploy war for the application into weblogic server it will give file not found error. Though this file already exists inside the .war but from the application it is not able to pick the files.
    We find that these file need to be put in weblogic domain home and we put it there and application works.
    I decompile the jar and found that inside java class they use FileReader("allXXX.xml") path and when I Google it and found that it will pick the file from weblogic domain directory.
    The issue is that we need to put properties file in specific weblogic folder like /3party/config by setting the class path inside startWebLogic.cmd. Please let us know solution for same
    Thanks in advance
    Edited by: sb**** on Mar 19, 2012 9:08 AM

    Hi , I am also facing the similer issue. I am deploying war file of my Spring MVC application , but its not picking resource bundle .properties files from one of the configuration file.
    <bean id="PropertiesRepository"
              class="LanguageBasedPropertiesRepository">
              <property name="propertiesFiles">
                   <map>
                        <entry key="en" value="classpath:/exceptionMessages.properties" />
                        <entry key="es" value="classpath:/exceptionMessages_es.properties" />
                        <entry key="default" value="classpath:/exceptionMessages.properties" />
                   </map>
              </property>
         </bean>
    Please let me know how we can modify this to make it work.
    thanks .

  • Specify handler for a logger in properties file

    Hello All,
    Is there a way of specifying a specific handler for a specific logger within the logging.properties file? I have not been able to find any documentation on the logging.properties file settings. I am looking for something like this:
    com.eric.program.handlers = java.util.logging.ConsoleHandler
    com.frank.handlers = java.util.logging.FileHandler
    I would rather keep all my settings within this properties file instead of coding it. If you know where I can find some documentation, please let me know. I am using J2SE 1.4.1.
    Thanks.

    Well, after failing to assign a handler to a specific logger, I checked the LogManager source code and, alas, it only supports assigning handlers to the root logger.
    What a bummer ... I think this is a real flaw in the LogManager design, especially since log4j supports assigning appenders to specific logger.
    The (more or less) good news is that LogManager is designed for subclassing (by j2ee container apps, but hey) ... so you can try to add this functionality to your own LogManager and use that through the system property java.util.logging.manager.
    import java.io.*;
    import java.security.*;
    import java.util.*;
    import java.util.logging.*;
    * All properties whose names end with ".handlers" are assumed to define a
    * whitespace separated list of class names for handler classes to load and
    * register as handlers on the logger (whose name corresponds to the property
    * prefix). Each class name must be for a Handler class which has a default
    * constructor.
    public class CustomLogManager extends LogManager
        public CustomLogManager()
            super();
         * Overwritten to also add handlers
        public synchronized boolean addLogger(Logger logger)
            final boolean res = super.addLogger(logger);
            final String property = logger.getName() + ".handlers";
            if ( null != getProperty(property) )
                setHandlers(logger, property);
            return res;
        // Taken from java/util/logging/LogManager.java#initializeGlobalHandlers()
        private void setHandlers(final Logger logger, final String property)
            // We need to raise privilege here.  All our decisions will
            // be made based on the logging configuration, which can
            // only be modified by trusted code.
            AccessController.doPrivileged(new PrivilegedAction() {
                public Object run() {
                    // Add new global handlers.
                    String names[] = parseClassNames(property);
                    for (int i = 0; i < names.length; i++) {
                        String word = names;
    try {
    Class clz = ClassLoader.getSystemClassLoader().loadClass(word);
    Handler h = (Handler) clz.newInstance();
    try {
    // Check if there is a property defining the
    // handler's level.
    String levs = getProperty(word + ".level");
    if (levs != null) {
    h.setLevel(Level.parse(levs));
    } catch (Exception ex) {
    System.err.println("Can't set level for " + word);
    // Probably a bad level. Drop through.
    logger.addHandler(h);
    } catch (Exception ex) {
    System.err.println("Can't load log handler \"" + word + "\"");
    System.err.println("" + ex);
    ex.printStackTrace();
    return null;
    // Taken from java/util/logging/LogManager.java
    // get a list of whitespace separated classnames from a property.
    private String[] parseClassNames(String propertyName) {
    String hands = getProperty(propertyName);
    if (hands == null) {
    return new String[0];
    hands = hands.trim();
    int ix = 0;
    Vector result = new Vector();
    while (ix < hands.length()) {
    int end = ix;
    while (end < hands.length()) {
    if (Character.isWhitespace(hands.charAt(end))) {
    break;
    if (hands.charAt(end) == ',') {
    break;
    end++;
    String word = hands.substring(ix, end);
    ix = end+1;
    word = word.trim();
    if (word.length() == 0) {
    continue;
    result.add(word);
    return (String[]) result.toArray(new String[result.size()]);
    On the other hand, it might be possible to write a reusable config class which does that kind of initialization, too.

  • 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...

  • Can't locate .properties file on Visual Admin

    Hello,
    I have created an RID.properties file inside a DynPro application under src/packages/... and I am able to load it and get it's attributes from the DynPro code.
    So far so good...
    As far as I know this properties file can be viewd and modifed on the Visual Admin under:
    Configuration Adapter -> webdynpro...
    I've browsed all the folders at this location and couldn't locate my .properties file. So where is it...?
    Roy

    i think you only want to access and maintain the properties on server side...
    ok, check out
    http://help.sap.com/saphelp_nw04/helpdata/en/b8/aa343e32ff1033e10000000a114084/content.htm
    for an example how to access the properties from your wdp app.
    i suggest loading all props into a specific context node and corresponding attributes. perhaps there are better ways.
    Now sth. uncomfortable:
    Be careful when you redeploy your app. All properties are overwritten with the ones you defined locally.
    you also cant delete the config on local side, it would be deleted on server, too. (at least i think so)

  • Initializing Application Params (web.xml vs. Properties file)?

    Hi Friends,
    Basically a question where I do not have much experience...
    I think that I have the choice of initializing web application wide parameters either with:
    a) Properties file (text file as managed by the Properties framework) or,
    + Here it is easy to read, modify parameters, ...
    - I dislike the deployment (manual procedure of storing the file in a particular directory...)
    b) web.xml (deployment descriptor) and "context-param".
    - The problem here is that it does not seems "easy" to change the deployed values in a web.xml from a java program.
    + Very easy to deploy (war, ear files)
    I would like to implement a solution that is:
    * Easy for the end-user to change its values
    * Easy to deploy and configure
    From some testing, I think that the properties file (and framework) is a better solution, but not sure...Any more expert advice?
    Thanks in advance!

    A properties file is often used with parameters that vary depending on a particular Locale. Under these circumstances, I find it impractical to store the file in an archive because the user in a given Locale may want to use the original file as a template to create a new Locale-specific version.
    Whenever I need to initialize my application with parameters that are totally under my control (e.g., when the parameters do not vary by Locale but new ones may be added or old ones removed), I often use just a plain .txt file kept inside of an archive file like a jar and access it file with something like this:
    URL url=myDialog.class.getResource("Params/myParams.txt");
    That's just my 2-cents.
    V.V.

  • Encoding issue in properties files generated with l10n tooling

    Hello,
    I recently try to alter my encoding settings as follows :
    * UTF-8 as workbench default, and for all content types
    * one exception : ISO-8859-1 for *.properties files (in order to conform to the specs of this format).
    Now this gives me an issue when using the l10n tooling: apparently, all the generated properties files are encoded in UTF-8 (the new workbench default), ignoring the content type specific settings.
    The sad result : hieroglyps.
    Isn't there any way for me to specify the generated properties files should be encoded in ISO-8859-1... ?
    Thomas

    please file a bug we need generate those files in 8859-1 all time
    because this is what the spec says.
    Tom
    On 27.07.15 17:18, Thomas Elskens wrote:
    > Hello,
    >
    > I recently try to alter my encoding settings as follows :
    > * UTF-8 as workbench default, and for all content types
    > * one exception : ISO-8859-1 for *.properties files (in order to conform
    > to the specs of this format).
    > Now this gives me an issue when using the l10n tooling: apparently, all
    > the generated properties files are encoded in UTF-8 (the new workbench
    > default), ignoring the content type specific settings.
    > The sad result : hieroglyps.
    > Isn't there any way for me to specify the generated properties files
    > should be encoded in ISO-8859-1... ?
    >
    > Thomas

  • Can I programatically read the wls properties file

    I'd like to set my own application specific properties in the properties
              file and then read them programmatically. Can I do this?
              thanks for any help,
              Edwin Marcial
              

    http://homepage.beasys.com/denali/classdocs/javadocs/weblogic/common/ConfigServicesDef.html#getProperty(java.lang.String)
              Yes, you can programmatically get this information with the help of a t3
              client. I am sure there is documentation on the web on how to do this.
              -- Prasad
              Edwin Marcial wrote:
              > I'd like to set my own application specific properties in the properties
              > file and then read them programmatically. Can I do this?
              >
              > thanks for any help,
              >
              > Edwin Marcial
              

  • Very weird issue with server logging when using log4j.properties file

    I'm using log4j logging. In log4j.properties the root logger is set up to use the ServerLoggingAppender class so that all our application logs go to the main server logfile. In addition, there are several appenders defined for specific components, with output going to specific per-component log files. Everything is going fine until I launch the server console. At this point all of those per-component log files get wiped out (zero length) and some non-ASCII lines are written to at least one of these files, after which the logs appear to be fine. The main server log file does not appear to be affected (because the root logger is set to "warn" level, while component-specific loggers are set to trace, the contents in these files is different; however I tried disabling all the other appenders and turning the root logger up to trace, and that still did not re-create the problem in the main server log file.
    And here's the really weird part -- if I use the same configuration, but in a log4j.xml file, the problem does not happen.

    Figured it out.
    We were passing in the configuration for log4j as -Dlog4j.configuration=file:/<properties file> and this was added to the command line for both the managed and admin servers. Problem is that the console app starts its own instance of log4j, and when it reads the configuration for the appenders it initializes or rolls over the files. At some point we have two JVMs accessing the same files, so some corruption is bound to happen.
    I'm not clear why the .xml file made a difference, but earlier we had been passing the log4j configuration as a jar file placed in the domain/lib folder, so perhaps the designer reverted to that (placed the log4j.xml file in a jar in lib, and not simply changed the -Dlog4j.configuration=file:/ option.

Maybe you are looking for

  • I can no longer upload files by draging and droping from windows explorer. Help!

    Previously if had to upload a file i used to simply drag and drop that file from my pc to the website open in mozilla but can no longer able to do that. Now i have browse the file. its lengthy. Please help...

  • Can't locate movieClip

    This will be hard for me to explain, but please bare with me. I have loaded an external .swf file on to the stage with multiple movieClips in it. From the main timline of which I load this external .swf file, I am moving the movieclip(s) around the s

  • Retrieving time for default Btree and time sorted Btree

    Hi all, I am working on FreeBsd and Berkeley DB 4.5.20 I have 2 kind of Btree databases and I want to measure the time for sequentially retrieving of all records. 1. Btrees with fixed record size of 128 Byte 2. Btrees with variable record size of aro

  • Publish warning message in SRM ITS

    Hello Friends We are implementing SRM 5.0 & want to publish warning message in SRM ITS. Could anybody guide me how we can do it for web browser.

  • Time machine starts well, and then slow as cold molasses

    Hi All, I've scoured the net for clues, but no love. I've set up a new external drive for TimeMachine. I created a single partition with Disk Utility, formatted as HFS+ and told TM to use it for backups. Clicked go. Yay! Lots of data cruising along a