Home » Core Java

Core Java

JAX-RS Security Example

java-logo

1. Introduction Security is an important aspect of web-services. Security can be ensured at several different application layers. The Oracle document here propounds different mechanisms of implementing security. In this article we are going to keep it simple and demonstrate how transport layer security could be introduced. So we are going to cook-up a simple jax-rs application that entertains some ...

Read More »

JAX-RS Client Example

java-logo

1. Introduction In this article we are going to present an example code of writing a JAX-RS Client. As the reader would be aware JAX-RS API is a standard to simplify the writing of RESTful Web Services and their clients in Java. This will be a Jersey Client and we will assume that we have a Server already set-up that ...

Read More »

JSON with JAX-RS Example

java-logo

Introduction This article presents an example of using JSON with the JAX-RS API. Well, this a simple introductory statement that carries a lot of weight as it assumes that the reader is familiar with JAX-RS, Jersey and JSON; terms that we are going to frequent in this example. For those unfamiliar but still interested in the adventure we will skim ...

Read More »

Java JPanel example

java-logo

Introduction JPanel is basically a virtual container that can be used to group certain components to create a user interface for Java Desktop Application. It is usually being attached to a layout (for example: GridLayout) and have it act as a consolidator of components that sticks together to form a union of programmable user interface objects. For this post, I’ll ...

Read More »

JDBC Create Table example

java-logo

1. Introduction This article presents a simple example of creating a database table. We will be using the JDBC (Java DataBase Connectivity) API to connect to a relational database and execute a SQL query to create a table using the Statement object. Note that one could use any of the methods offered by the Statement object viz. execute(String sql), executeQuery(String ...

Read More »

Gradle SourceSets Example

gradle-logo

Gradle SourceSets are a key concept for the Gradle Java Plugin which define the structure of Java Source Files. In this example will see how to use this concept, customize them through gradle properties, create a new sourceset, get documentation and assembling them in a JAR. 1. Introduction to Gradle SourceSets 1.1 What is a Gradle SourceSet ? A SourceSet is ...

Read More »

JDBC Batch Insert Example

java-logo

1. Introduction In this article we are going to present a simple example of using JDBC Batch for doing bulk inserts into a relational database. As stated in a previous article, the Batch operation exposed in JDBC (Java DataBase Connectivity API) helps to bundle together a group of operations and execute them as a single unit. This helps to avoid ...

Read More »

XPath parent node example

java-logo

In the previous example, we introduced the dependant axis specifier. In this example, we shall talk about the ancestor axis in XPath Expression. The ancestor tag is used to select the ancestor of the current node and the ancestor of the ancestor and so on in context of the current node. We will look at a few examples to see ...

Read More »

Gradle GWT Integration Example

gradle-logo

This example offers a complete tutorial on how to integrate Gradle & GWT. Then, we see how build a GWT project with Gradle and how to run them on a Jetty Server. 1. Introduction to Gradle GWT Integration GWT is the Google’s Toolkit to develop ajax applications using the Java language, these applications like Java EE’s Applications need a server, but, in this case, is a lightweight web ...

Read More »

XPath ancestor example

java-logo

In this example we will learn how to get the ancestor details of a given node using XPath. We will start with the introduction of XPath – what it is and how to use it, then we will see the working model of the desired functionality. Tools and technologies used in this example are Java 1.6, Maven, Intellij.(Please note you don’t ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close