Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Reading Key Values from property file using Pojo class

    Please Help!, Its Urgent:

    I need read the key values of property file by using pojo class.

    Like:

    Property file:
    --------------
    keyOne=valueONe
    keyTwo=valueTwo

    Pojo Class:
    --------------
    public class read{
    private String keyOne;
    private String keyTwo;
    //PROVIDE SETTERS AND GETTES

    }

    Now how can we get the values of property key.

    Please provide solution.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    StringTokenizer.
    Read the lines in using scanner or whatever, and then use the tokenizer to split them at the =. You can also use string.split() functionality to break it into a string array. There are a lot of ways to do this even just using the scanner, so choose whichever you like the most.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •