display error message for dupliacate record in properties file
This is my code.
Here if the properties file contain duplicate records(i.e.)more than one entry e.x.001,002,003,001 i want to display the error message "Duplicate Record found" while compile the java file.Please give the correct solution soon.
import java.io.*;
import java.util.*;
public class Sample2
{
String message;
public Sample2()
{
}
public void setMessage()
{
Properties props = new Properties();
try {
props.load(new FileInputStream("message.properties"));
message = props.getProperty("002");
System.out.println(message);
for (Enumeration e = props.propertyNames();
e.hasMoreElements();) {
}
}
catch(IOException e)
{
e.printStackTrace();
}
}
public static void main(String[] args)
{
Sample2 gr = new Sample2();
gr.setMessage();
}
}
View Answers
Ads
Related Tutorials/Questions & Answers:
Advertisements
error message
error message Sir i make one form facility with insert,update,delete.i want to
error msg if any type of the data is missing and
display in
error msg which of the data is misssing
Error display
Error display I want to give a
message on the screen that an
error has occured...but I dont want to use alert and give pop up box...any other solution for the problem
error display
error display I am creating a web page...I have two textboxes and an add button. If nothing has been entered in the textboxes and if I click the add button , I have to get pop up box indicating that "please fill in the fields
struts2 properties file
struts2
properties file How to set
properties file in struts 2 ?
Struts 2 Format Examples
Struts 2 Tutorial
neo4j-server.properties file location
neo4j-server.
properties file location Hi,
Where is the location of neo4j-server.
properties file in Linux?
Thanks
Hi,
Location of neo4j-server.
properties file:
This
file is present in /etc/neo4j directory of linux
To Display the 'Last Modified' message in JSP
To
Display the 'Last Modified'
message in JSP I have to
display the "Last Modified" auto save
message in a portlet page at the right end corner... Modified'
Message should be displayed
Java Properties File Example
file into the program.
4. Finally get the text using the key of the
properties file.
An example of using the
properties file and changing the caption French...;How to read
properties file in Swing Application?"
Using
Properties files
Properties file in Java
Properties file in Java
In this section, you will know about the
properties
file. The
properties file is a simple text
file.
Properties file contains keys
and values
depending on the form name i have to display the message
on the form name i have to
display the
message.
for example, i have 3 jsp pages... on contact us after entering all details page has to
display message like"thank u for contacting us"
if user clicks on suugest
display message like"thank u
Properties file in Java
Properties file in Java
Properties file in Java
In this section, you will know about the
properties
file. The
properties file is a simple text
file.
Properties
applicationcontext.xml properties file
applicationcontext.xml
properties file
In this tutorial I will explain how you can use the
properties defined in
.
properties file in your spring application...
changing the
properties file.
Suppose you are developing an email sending
Spring Security Custom Error Message
it with custom
error message :
The project hierarchy and jar
file used is given below...Spring Security Custom
Error Message
In this section, you will learn about Custom
Error Message in Spring
Security.
Spring Security have predefined
error
Java Write to properties file
Java Write to
properties file
In this section, you will learn how to write data to
properties file.
The
properties file is basically used to store... has provide
Properties class to store
data into .
properties file. It consists
application cntext file error
application cntext
file error i got an
error when execute the
file in junit using application context
file
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'sessionFactory' defined in
file
Error in log file
Error in log file Hi,
I AM using Apache tomcat 6.0.16 server and created the JDBC connection pool to connect data base oracle 10g at time... org.apache.catalina.core.ApplicationContext log
SEVERE:
Error loading WebappClassLoader
delegate
Error in log file
Error in log file Hi,
I AM using Apache tomcat 6.0.16 server and created the JDBC connection pool to connect data base oracle 10g at time... org.apache.catalina.core.ApplicationContext log
SEVERE:
Error loading WebappClassLoader
delegate
Error in log file
Error in log file Hi,
I AM using Apache tomcat 6.0.16 server and created the JDBC connection pool to connect data base oracle 10g at time... org.apache.catalina.core.ApplicationContext log
SEVERE:
Error loading WebappClassLoader
delegate