RESTful Web Service using Jersey


In this tutorial I am going to explain a very basic example using Jersey REST Services. Building webservices using the REST concept is popular because of its simple nature and light weight. We have already explained how to write REST services using the Spring MVC framework. Spring provides out of the box support for the […]

Use Flexbox in CSS3 For Creating Flexible Layouts


In this article we look at the operation of flexbox in CSS3, their properties, and examples of applications and how to create flexible layouts with CSS3. Flexbox or else Flexible Box Model is a new concept in CSS3 which aims to organize and align the HTML elements in a dynamic and very easy. Forget the old alignment of HTML elements with properties […]

Bean Validation in Java EE 7 – Creating Custom Constraints and Validations


In my previous post I showed how one can make use of the default constraints provided by the Bean Validation API in validatng the model data. Bean Validation API allows the developers to define their own constraints by creating a new annotation and writing the validator which is used to validate the value. In this […]

How to Attach JDK source with Eclipse IDE?


This tutorial explains about how to attach JDK source code to your working environment. When you want to look at particulat source code, we can use CTRL+Click on the class name to refer the source code. However, by default developer can not refer JDK’s core Java files. It is referenced as the class files and […]

Expected Exception Test in JUnit 4


In my previous article I have written down the sample code for Junit 4 testing using annotations. In this tutorial I would like to write about expected exception testing and Rules which is introduced from JUnit 4.7. JUnit 4 introduced the expected parameter, which makes a test succeed if and only if a certain exception is thrown. In […]

JUnit 4 Annotation Example


This tutorial explains the basic usage of JUnit 4 annotations. JUnit is the most popular Unit testing framework most widely used by the Java developers. After the release of Java 5.0 annotations, JUnit 4 has updated to support the annotation programming for the testing methods. Also it introduced @BeforeClass and @AfterClass methods which has to […]

Connect To MySQL With JDBC Driver


Here is an example to connect your JDBC code to MySQl database. You have to download mysql.jar for the JDBC driver class from here.   If you are not copying the mysql.jar file in the classpath, you will get the following error.

Introduction to Backbone.js


The Backbone.js is a JavaScript library using which you can make various web applications. In this article I’ll give an introduction to it and explain to develop an application using Backbone.js. When developing a web application you will inevitably work with the javascript language to handle DOM manipulation or some other needs. There are many JavaScript […]

Bean Definition Inheritance in Spring


In my previous post I have explained how to inherit collection values from the parent bean. Spring offers out of the box support on inheritance for the bean definitions in the XML configuration file. You can define any number of beans and extend them by using the parent  attribute in the bean element. Child bean can […]

How to Merge Collections in Spring?


In my previous post I have explained about how to use collections in Spring. This tutorial explains how to merge collections or inherit the values from the parent bean. In some scenarios we need to define a bean as abstract using the abstract=true in the bean definition. It means that another bean definition will be […]