Binod Suman

Greenhorn
+ Follow
since May 07, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Binod Suman


There are many ways to read properties file in java. Here explained two way, using

1. ResourceBundle
2. Properties Class

How to use this tutorial
1. Create one directory src and put both below files (MyProp.properties and ReadPropFile.java)

2. MyProp.properties
name = Binod Kumar Suman
roll = 110
city = Bangalore

3. ReadPropFile.java

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Enumeration;
import java.util.Properties;
import java.util.ResourceBundle;


public class ReadPropFile {

public static void main(String[] args) {
getData();
}

public static void getData(){
try{
Properties propertiesFile = new Properties();
propertiesFile.load(new FileInputStream("src/MyProp.properties"));
String studentName = propertiesFile.getProperty("name");
String roll = propertiesFile.getProperty("roll");
System.out.println("Student Name :: "+studentName);
System.out.println("Roll Number :: "+roll);

//Fetch all the Properties.

String key;
Enumeration e = propertiesFile.propertyNames();
while (e.hasMoreElements()) {
key = (String)e.nextElement();
System.out.println(key+" "+propertiesFile.getProperty(key));
}

}catch(IOException e){
e.printStackTrace();
}
}
}


Thanks,

Binod Suman

http://binodjava.blogspot.com/2009/05/how-to-read-properties-file-in-java.html
14 years ago
JSON : JavaScript Ojbect Notation.

It contains name/value pairs, array and other object for passing aroung ojbect in java script. It is subset of JavaScript and can be used as object in javascript.

You can use JSON to store name/value pair and array of ojbect.

var student = {
name : "Binod",
roll : 110,
subject : ["Java","Database","Networking"]

}

alert("Student Name :: "+student.name);
alert("Student All Subject :: "+student.subject);

I have post one complete tutorial on JSON you can get it from here.

http://binodsuman.blogspot.com/2009/05/json-easy-example-get-start-with-json.html

Thanks,

Binod Suman
http://binodsuman.blogspot.com
14 years ago
I have also post similar type of Java example to How to get other TimeZone time by JAVA.

http://binodjava.blogspot.com/2009/05/how-to-get-other-timezone-time-by-java.html

Thanks,

Binod Suman

http://binodsuman.blogspot.com
14 years ago
I didnt find any good tutorial on Ajax based on DOJO. Then I developed one tutorial, have a look

http://binodsuman.blogspot.com/2009/04/ajax-using-dojo-tutorial.html

It is working in Eclipse IDE, but not running in other IDE like RSA and RDA getting Object required error.

Thanks,

Binod Suman
http://binodsuman.blogspot.com
14 years ago
Hi,

I have a running jBPM application. And that application is running using jbpm-console. Now I want to call the same jBPM program using the JSP, mean to say I want to use jBPM api to my existing web application.
Is any approach to call existing jBPM from the JSP/Servlet/Wicket.

Thanks,

Binod Suman
15 years ago
Hi Peer,

Thanks a lot.
I also had the same problem that how to start the webservice development work either from java class or from wsdl. But after read your given url (Chapter 2. Why Contract First?), now I am confirm that we should start from wsdl.

Thanks again.

Binod Suman
15 years ago
This is also a good and working small code for jcheckbox inside the jtable as cell.
Jtable with Jcheckbox.

Thanks,
Binod Suman
15 years ago
Hi Sridhar,

The best way to start jsf is Eclipse Europa. Using my given URL, you can configure the JSF jar file with Eclispe and develope the simple example. Given URL is in video format, it will guide you to configure JSF and build the example.

JSF Tutorial

Thanks,

Binod Suman
15 years ago
JSF
Insted of use JDBD, nowadays Hibernate is best option for database stuff. It provides a lot of benefits over simple JDBC like caching, session, work on object directly instead of column and much more.

Get more on Hibernate @ Hibernatehttp://www.hibernate.org/
15 years ago
Insted of use JDBD, nowadays Hibernate is best option for database stuff. It provides a lot of benefits over simple JDBC like caching, session, work on object directly instead of column and much more.

Get more on Hibernate @ Hibernatehttp://www.hibernate.org/
Hi Pilar,

Really very good and to the point solution. I have also solved the same problem with using your given solution.

Thanks

Binod Suman