Markup language that define a set of rules for encoding documents in a form that is both human-readable and machine-readable.
• It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications.
• Can be embedded with all types of oop language with parsing.
Benefits-
1. Simple
2. Self description
3. Contains machine readable context information
4. Facilitates the aggregation of data
5. Can embed multiple datatypes and existing data.
Sunday, November 4, 2012
What is XML ?
How to insert a record in table using hibernate.
Hibernate is a ORM.To insert the record in table basically a object is inserted which contain the all attribute of that record field. for insertion create a bean class of that types variable and apply getter and setter property.now initialize a object of that class inject the values and save the object after it the table is updated and record is inserted.
To see the code click here.
Saturday, November 3, 2012
How to write hibernate code in java application
To use hibernate first setup the environment of hibernate .After that need to create some files in application as-
1. Hibernate.cfg.xml file contain database configuration,connection pool,user,username,password and other sql information. the main thing is that we can not change file name the name always as it is.
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">
com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">
jdbc:mysql://localhost:3306/hibern</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">root</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<!-- Mapping files -->
<mapping resource="createtable.hbm.xml">
</mapping></session-factory>
</hibernate-configuration>
How to set Hibernate environment in java application
To provide the ORM in java application need to implement the hibernate. To implement the hibernate need the jars or libraries which is provided by hibernate download these jar and add these jar in application and use the benefits of hibernate.
To download the Hibernate jars click on below link-
http://sourceforge.net/projects/hibernate/files/hibernate3/3.6.10.Final/hibernate-distribution-3.6.10.Final-dist.tar.gz/download
After download that library. add these jars in project. now application is ready to use hibernate.
Friday, June 15, 2012
How to import xml file in another xml ?
Here we discuss that how to import a xml file into another xml file.for this use <import > tag in <beans> tag and set the path of xml in resource property of import tag. To illustrate it lets see a example-
Directory Structure-
Wednesday, June 13, 2012
How to Injecting the bean properties before load xml in application and out side xml
Monday, May 7, 2012
How to access the beans from the XML file by BeanFactory
To access the Beans from the XML file we can use BeanFactory.(see the example)
BeanFactory fact=new XMLBeanFactorynew (new FileSystemResources("XMLfilename.xml"));
To access the Beans from the XML file we can also use ApplicationContext.
ApplicationContext context=new ClassPathXmlApplicationContext("XMLfilename.xml");
Friday, January 13, 2012
How to create a TCL script in router for ping ?
Saturday, January 7, 2012
How to configure GNS3 to a virtual box client.
1.--> Start the gns3 and drag a router from the list and drop it to the working windows.
2.--> Like router also drag a cloud and drop in working window.
3.--> Now Double click on cloud and select a C1 menu on the left hand list .
after that select NIO ethernet tab.Here is the drop down list in which select a virtual
Box host only network. add this and apply the settings.
Thursday, December 8, 2011
How to get java source code to a .class file
Steps to get source code-
1--> Choose file menu.
2-->select open tab.
3-->give the location of the class file and click open. now you can show the code of the class file.
Sunday, November 20, 2011
How to add a filter in dynamic web project of java or control traffic on web
Saturday, October 15, 2011
How to execute a privilege mode command on configuration mode in Router
To solve out this problem do command it used to execute privilege commands on global mode.
Monday, October 10, 2011
How to worms are infects to networks what are the steps are used to infect network?
Thursday, October 6, 2011
How to change the ip address in linux
To reach the command terminal follow instructions -
-> Goes to Applications ---> Accessories ---> Terminal.
-> To check the IP address enter command
Tuesday, October 4, 2011
How to connect two computers via lan and share data ?
Saturday, October 1, 2011
How to create a simple java 3d program to make a ball ?
import com.sun.j3d.utils.universe.*;
import javax.media.j3d.*;
import javax.vecmath.*;





