Restful web services implementation using Jersey

In the previous post we discussed about the Restful web services annotations and HTTP methods. In this post we learn development of Restful web services using Jersey Framework in the Eclipse IDE in Java. We will develop a sample HelloWorld rest service. Requirements :- Software Download Link Java 6.0 http://www.oracle.com/ Eclipse Indigo http://www.eclipse.org/ Apache Tomcat 6.0 http://tomcat.apache.org/… Read More »

Configure Subclipse in Eclipse

In this post we will discuss about how to configure the Subclipse in the Eclipse IDE. Subclipse is an Eclipse plugin providing support for Subversion within the Eclipse IDE. The software is released under the Eclipse Public License (EPL) 1.0 open source license. With the help of the subclipse we can do all the SVN… Read More »

Configure Tomcat Server in Eclipse

In this post we will discuss about how to configure the Tomcat Server in the Eclipse IDE. Prerequisites :- Software Download Link Eclipse Indigo http://www.eclipse.org/ Apache Tomcat 6.0 http://tomcat.apache.org/ Steps for configuring the Server :- 1.  First we need to download the Eclipse JEE version, and server from the above mentioned locations and install them… Read More »

Restful Web Services in Java

There are two ways for the development of web-services in java. 1. SOAP – Simple Object Access Protocol For the development of SOAP web-services we use JAX-WS Standards, Apache Axis. SOAP web-services response will be always in XML format. 2. REST – Representational State Transfer For the development of REST web-services we use JAX-RS, Restlets,… Read More »

Design Patterns in Java

In this post we will know about the Design Patterns in Java. It is crucial to have the knowledge of Design Pattern for design/development of any software, mainly when working with object oriented design. What is Design Pattern ? Design Pattern is not a framework, it described the problem and provides a solution to that… Read More »

MySQL Insert Query

In this post we will know about MySQL Insert Query by using select query. There are multiple ways to insert data in a table as shown below. INSERT INTO table_name (col1,col2) VALUES(val1,val2); OR INSERT INTO table_name (col1,col2) VALUES(row1_val1,row1_val2),(row2_val1,row2_val2),(row3_val1,row3_val2); In the same way we can use the select the query to insert the data from one… Read More »

Difference between == and === in PHP

The operators  ‘==’  and ‘===’ are called comparison operators. These are mainly used used to compare the values. The main difference between == and === in PHP is shown below. == (equal) : It checks whether the Left side value is equal to the right side value. === ( identical) : It checks both the values and… Read More »

LIMIT and TOP in select query

In this post we will learn the usage of LIMIT and TOP in select query. In order to limit the records from the select query each database provides different syntax. For example : MySQL has LIMIT – which will be used to limit the records from the select query. In the same way SQL Server provides… Read More »

Remove element from an array in PHP

In this post we show how to remove element from an array in PHP to check an element from one array with another array and remove that element from the first array. The below code snippet will show how to remove that element by comparing the two arrays. $mainArray – is the main array from which… Read More »

Get hours between dates

The simple way to get the number of hours difference between the two dates using java.util.Date is shown below. endDate.setHours() is deprecated so @SuppressWarnings(“deprecation”) is used above the main method. import java.util.Date; public class TimeCompare { /** * @param args */ @SuppressWarnings(“deprecation”) public static void main(String[] args) { Date startDate = new Date(); Date endDate… Read More »