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.

Similar Messages

  • About properties file

    Hi Guys,
    I have a major doubt about '.properties' file.
    I thought if a '.properties' file exists anywhere in the classpath, it should be picked up by any application.
    But most of the time, eventhough it's in the classpath, '.properties' file is not found picked up at all.
    Is that my understanding about this is wrong or is there anything else I need to do to make the '.properties' file visible to all applications?
    what could be wrong?
    please enlighten me on this.
    Thankx in advance..
    Manesh

    you need to use the resource bundle facilities. I don't think so. I think the following will load a properties file using the classpath. It doesn't use a ResourceBundle.
      Properties aProperties = new Properties();
      static final String MAIN_FILE_PATH="./resource/mine.properties";
      // This should find 'mine.properties' on the classpath.
      // It will search each dir in the class path adding
      // MAIN_FILE_PATH to the end of each dir.
      // It will replace the path seperator if needed (win os.)
      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);

  • Questions about properties files

    Hello,
    I have two questions about properties files.
    1. Is it possible to import a properties file from another properties file?
    2. Is it possible to have variables in a properties file as described below in code snippet.
    Thanks in advance,
    Julien.
    Code snippet:
    var_one=foo
    var_two=$var_one bar
    The second line would then read "foo bar"

    Hello,
    I have two questions about properties files.
    1. Is it possible to import a properties file from
    another properties file?If you write your own code to parse whatever import statement you decide to put in the properties file, yes. But there's no provision to do so in the core APIs or in the standard usage of these files.
    2. Is it possible to have variables in a properties
    file as described below in code snippet.Same as the answer to your first question. Though this kind of thing is more common, so there might be a library at jakarta or sourceforge or mindprod or something that does this.

  • How can i read comments from properties file in the right order??

    Hello
    I want to build a console that read a properties file and print to the screen the property name, property value and property description and the developer can change the name or the value or the description of the property and update the property file.
    But the problem in using the properties class that it doesn�t read the comment and not save the properties in their order so I can�t couple description and name of the property.
    Does any one know any utility that do the job or know how to solve the reading the comments problem???
    Thank you a lot?

    sorry but i dont understand how the solution of using
    a dot ( property_key.description ) helping me to
    solve the problem?
    please try to explain it agin.
    thank youYou wrote:
    "I want to build a console that read a properties file and print to the screen the property name, property value and property description and the developer can change the name or the value or the description of the property and update the property file."
    So i'm as developer imagine that somebody edit properties in GUI or console. So you have 3 text fields: property name, property value, and propety description. Then developer save edit changes, then text fields maped to properties file and:
    text field "property name" and text field "property value" construct property:
    name=valuetext field "property name" adding ".description" and text field "property description" construct property:
    name.description=descriptionFor one described property, you will have put two properties.
    Thanks!

  • 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

  • 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);
    }

  • Nitpicking about .properties file syntax

    After years of using these files, could someone please tell me what the convention for syntax is? :)
    This:
    somekey=valueor this:
    somekey = valueAnd YES, this must be the least important thread of all time, but since we're with multiple guys here mixing both variants I would like to standardize on one.

    Both; also the same thing with : instead of =, or without either. See the Javadoc for java.util.Properties.load():
    'Any white space after the key is skipped; if the first non-white space character after the key is '=' or ':', then it is ignored and any white space characters after it are also skipped. '

  • Changing a .properties file from within a programme

    Hi, I was just wondering is there anyway that i can change a .properties file from within a programme?
    I have certain values in the .properties file and I want to add a username and password to the file once it has been entered in a login part of the programme.
    I have had a look at the docs and can not seem to find any suitable methods.
    Cheers Gareth.

    store is a good method.
    In practical use, sometimes you have a .properties file full of comments (properties files are to be modified by humans, and humans need comments), but they are not retrieved by "load" so they will not be stored back by "store". It's a pity that it happens (the equivalent Windows API, WritePrivateProfileString, has a better behaviour).
    Maybe someone has written a method that can modify a properties file, without changing the order of the pairs name=value and without throwing out comments.

  • How use properties file

    Hi i read about properties file in java .. i didn't get much more..
    how can we use this in program.. what is the benefit..
    anyone know any examples in site.please let me know about that

    int count=getGoogleSearchCount();
    public int getGoogleSearchCount(){
    search keyword="http://www.google.co.ke/search?hl=en&q=java+properties+class&btnG=Google+Search";
    // missing code
    return count;
    System.out.println(count);i ran the above code snipplet and guess the output?
    291,000 results.
    DONT BE LAZY.

  • How to read properties file(key-value) in OSB?

    Hi
    I have a scenario in which I have to read some properties(key-value) from a file. Earlier whole code was developed in java and its easy to read properties file in java.
    But now need to implement this in OSB and performance is very critical in this project.
    I followed DVM approached defined in
    http://blogs.oracle.com/christomkins/2010/02/domain_value_maps_in_oracle_se.html and http://blogs.oracle.com/christomkins/2010/02/domain_value_maps_in_oracle_se.html
    But it did not work. I have hundreds of properties(key-value pairs) to read and need pass them to the business service along with input of proxy service.
    What is the best approach for this (Can not go for db call as performance is very critical)?
    Thanks
    Vibhor

    $DVM= <dvm      name="InterfaceProperties" xmlns:ns1="http://xmlns.oracle.com/dvm" xmlns="http://xmlns.oracle.com/dvm">
         <columns>
         <column      name="PROPERTY_KEY" qualifier="false" order="1"/>
         <column      name="PROPERTY_VALUE" qualifier="false" order="1"/>
         </columns>
         <rows>
         <row>
         <cell>dealer.locate.default.buypower.link</cell>
         <cell>http://www.xyz.com</cell>
         </row>
         <row>
         <cell>dealer.locate.default.unitOfMeasure</cell>
         <cell>MILES</cell>
         </row>
         <row>
         <cell>dealer.locate.brand.identifier.nu</cell>
         <cell>Nurun</cell>
         </row>
         <row>
         <cell>dealer.locate.brand.identifier.bu</cell>
         <cell>Buick</cell>
         </row>
         <row>
         <cell>dealer.locate.brand.identifier.ca</cell>
         <cell>Cadillac</cell>
         </row>
    </rows>
    </dvm>
    XPATH is- ns1:dvm/ns1:rows[1]/ns1:row[1]/ns1:cell[1]/text()
    If I run this xpath in Jdeveloper,its giving me proper output.
    Please this as CQuery resource and try to run this xpath on OSB console.
    Thanks
    Vibhor
    Edited by: Vibhor Rastogi on Sep 21, 2010 4:59 AM

  • Reading values from properties file

    Hi All,
    I am in need of a help from you all.I have a login.jsp which gets username and password as user input and checks in the servlet that if it was admin and admin it will take to index.jsp and if it was other than admin and other users it should take to index1.jsp.For now i am using an if condition to check the values and to dispatch the request.I need to use a properties file for this and need to check by getting the values from the properties file.And also it should check for each entry in properties file and if it finds any matches it should take to the corresponding page.
    Please help me in achieving this.
    Thanks,
    laxmi

    Hi All,
    I am in need of a help from you all.I have a login.jsp which gets username and password as user input and checks in the servlet that if it was admin and admin it will take to index.jsp and if it was other than admin and other users it should take to index1.jsp.For now i am using an if condition to check the values and to dispatch the request.I need to use a properties file for this and need to check by getting the values from the properties file.And also it should check for each entry in properties file and if it finds any matches it should take to the corresponding page.
    Please help me in achieving this.
    Thanks,
    laxmi

  • I am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g

    i am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g

    hi TimoHahn,
    i am getting following exception in JDeveloper(11g release 2) Studio Edition Version 11.1.2.4.0 but it works perfectly fine in JDeveloper 10.1.2.1.0
    Root cause of ServletException.
    java.lang.NullPointerException
    at java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:136)
    at java.util.ResourceBundle.getObject(ResourceBundle.java:368)
    at java.util.ResourceBundle.getString(ResourceBundle.java:334)
    at org.rbi.cefa.master.actionclass.UserAction.execute(UserAction.java:163)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

  • How do I change the value of the Order By field in an MP3 file?

    good day Guys,
    I'm new here in the forum and I have a question that is "breaking" the order of my songs and my head too ...
    How do I change the value of the Order By field in an MP3 file?
    for example, in the photo below, the song "The Bad Touch" is coming BEFORE the song "A Little Respect", this happens because of the Name field to Order ...
    My "problem" is in the photo below, the "tab" Order, iTunes will not let me erase what is written in the "Sort As" ...
    I've been "collecting" several songs over SEVERAL years
    I'm currently with more than 1,500 songs on HD and several backups on DVDs and external hard drives and I think, download it again, will be a "little" laborious and boring
    I DON'T WANT to be filling the tags of songs (name, singer, CD, year, etc.)
    I have used the program Mp3tag to remove the music tags
    I've tried to download the song again and go through Mp3tag program as if it were a new song
    I've changed the music access permissions, folder and even entire hard drive (my Windows has only one user)
    I've tried to catch the song again, from a previous backup
    I've tried to create a copy of the file at iTunes own
    I've tried to create a new music file in a music recording program
    NOTHING of what I did above resolved
    -> I'm using Windows 7 64-bit Ultimate
    -> I'm using iTunes 12.1.1.4 for 64-bit Windows
    -> My iPad is the third generation (a little old, I know) with Wi-Fi and 3G, but it has served me VERY WELL
    -> The iPad is updated with iOS 8.1.3 and is not unlocked
    I'm sorry for the GIANT post, but well, I think I could explain as much as possible and for my English, too bad, by the way, I'm from Brazil and I'm using Google translator
    Hugs and await answers,
    Paulo Ricardo

    hello turingtest2,
    my language is Brazilian Portuguese (there are some little differences between Brazilian Portuguese and the Portuguese of Portugal, but nothing that interferes with the script)
    at this time, I'm managing songs manually, I don't know if this will interfere with the execution of a script or command
    as I picked up this iPad recently, I still don't understand how to set up the iTunes Music Library and the person who gave me, told me it was easier to put the songs manually
    as you said, in my iTunes, 95% of the songs are with ALL the blank fields, including the Name to Sort field, only songs that begin with a/an/the standing with the Name to Sort field filled with name of the song, without the a/the
    I do not know what to do...
    I want to learn to ride the iTunes Music Library, that my work is less
    you know any site that teaches create/manage my iTunes Music Library?
    this site/forum may be in English, no problem
    thanks for all your help and the help of others who responded to my request

  • Can a Deployment Plan Modify Values in a .properties file?

    I'm using JDeveloper 11.1.1.6.0 and Weblogic 10.3
    I am currently in the process of creating a plan.xml file for our application, but we have a few properties files that contain configuration information. This information needs to change depending on the environment that we are deploying to. Is it possible to do this through a plan.xml or would we have to use some other method?
    Example:
    File: conf.properties
    ------start file-----
    A=1
    B=2
    C=3
    -----end file-----
    We would need to be able to change the value of B to be 5 instead of 2 if we are deploying to our test environment.

    As far as I can tell, what you linked is just using the deployment plan's XPath to update a value in the web.xml which is standard procedure. However, I am curious of being able to update values in a .properties file which is not an XML file, and thus can't be read by XPath. Is this possible or can the deployment plans only modify XML documents?
    [EDIT] From what I've been finding it seems I've confirmed that it can only override XML files, or atleast I've found no indications that it can do anything other than XML files. Though now I'm having issues of it overriding custom XML files. EG: I have a wf_client_config.xml file in the WAR's class path that I need to update depending on the environment, but have not been able to have the deployments recognize the override that I have listed in the plan.xml.
    So I guess now my question is, do I ened to do anything special to get it to recognize an XML file on the class path vs a standard xml file such as web.xml? Or should I make this a new topic?
    Edited by: mBaldwin on Jan 8, 2013 11:45 AM
    [EDIT 2] Marking this as resolved, it appears as though the plan.xml will only modify settings that could be modified by Weblogic naturally and it is not able to modify items that are on the classpath of the application.
    Edited by: mBaldwin on Feb 26, 2013 12:08 PM

  • How can i remove a key and its value from properties file

    hi all,
    i want remove a particular key and associated value from the
    properties file. is their any standard way of doing?
    thanks inadvance
    daya

    hi,
    thanks
    i am able to remove the key,
    one more question how can avoid storing date and time
    in properties file.
    thanks
    daya

Maybe you are looking for

  • Missing lables in the Top drop downs of the Adobe reader 9.5.1 after a deb install.

    I just installed the Adobe 9.5.1 reader to get the added functions that are offered with PDF reading with the Adobe reader instead of the standard reader that is very slim in the additional functions department. The reader is working great but the ad

  • SQLPLUS: define variable with multiple lines

    Hi All, I need define a varaible with multiple lines as following: define schema_name = 'aaa', 'bbb', 'ccc'; select * from tb_test where sName in &schema_name; However, it seems SQLPLUS dose not like the way I define the variable. What I want to do i

  • Problem calling program unit function in Forms 6i

    Hi, I'm new to programming with Oracle Forms. I have a question that I cannot seem to figure out. In Forms 6i, I have created a program unit function that compiles correctly. The trouble I'm having is calling it and displaying the function's contents

  • "Look for Apple TVs" is checked, but Apple TVs a No-Show

    My AppleTV refuses to re-unite itself with iTunes. In iTune Prefs the "Look for Apple TVs" is checked, but no Apple TVs show up in the box below. So I can't input the pass-code to get it syncing. It's weird because the network-password info in "Setup

  • X11 Update 2006 - 1.1.3 - Security warning when trying to update

    Hi there, I'm on 10.4.8 on an Intel Mac Mini, and software update informs me that there is a update waiting. I have tried over the last 2 - 3 days to install via Software update, and I just continuously get a warning about the update being corrupt. I