This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes How to read property which is conssiting of two values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "How to read property which is conssiting of two values " Watch "How to read property which is conssiting of two values " New topic
Author

How to read property which is conssiting of two values

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

I need to read a property File that is having two values :



sample File :

Country : NORWAY , DENMARK

Please let me know how can i read two values from a single property .

Thnaks in advance .

How to read property which is conssiting of two values


Here i am free to use csv files also for this . please let me know whetehr thic can be done either


Save India From Corruption - Anna Hazare.
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Sorry for the simple question , i got the answer . for others who want to refer :



filename.properties

Name :Ravi Kiran
City :Hyderabad Visakhapatnam

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

I think you'll like String.split better than StringTokenizer.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to read property which is conssiting of two values
 
Similar Threads
Doubt in checkboxlist
Using System properties or new Properties object?
Reading a file(on the internet) using servlets
Any replacement for ResourceBundle
System.properties or new properties object for reading a .properties file?