Solved

Read multiple values from dynamic properties file in java

Posted on 2008-10-15
1
2,624 Views
Last Modified: 2013-11-23
I have a properties file which contains the following fields:

Tag1=[URL]
TagValue1=www.abc.com
Tag2=[Study Code]
TagValue2=ABC 123
....
What i need to accomplish is that if one of the tags in square brackets, such as [Tag1], the value in the will be replaced with the value specified after the equal sign.  If the value was not specified, then no modification to the copied collection title will be performed. Number of tags specified in properties can change so i need to make this dynamic. Basically, the properties file is dynamic and number of tags specified along with their values can change. How can i accomplish this task in Java?
0
Comment
Question by:CalmSoul
1 Comment
 
LVL 6

Accepted Solution

by:
javaexperto earned 500 total points
ID: 22736640
well lets see, what initials values have the tags in the left side? for example:
Tag1=[URL]
do you want to assign String URL to the variable Tag1?
what when you don't have [] like:
TagValue2=ABC 123
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
servlet filter example 37 82
How do I remove an object from a 3 51
login form jsp example 2 49
JDBC performance 8 28
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question