• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading values from property file with equals  RSS feed

 
Ezra Exposito
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to read some data from a
property file that contains an '='
am having trouble with it.
Example:
//property file has the following
ldapUsername=uid=user1,ou=people,o=customers
Is there a way to read this in so
I get the correct value?
Thanks
 
Murali Nanchala
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There shouldn't be a problem reading that info in. We didn't. How do you read in the properties. Post some code....
 
Dave Landers
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer depends on what you are wanting.
If you read that properties file using Properties.load() you will get a property with a key of "ldapUsername" having a value of "uid=user1,ou=people,o=customers".
Looks right to me, but if you have another idea, then you may want to parse the file yourself.
 
Ezra Exposito
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I got it working.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!