Read/Write Image using Java

In this tutorial I will show you how you can read and write an image using Java. There are several kinds of image formats such as JPEG, GIF, PNG, BMP, TIFF etc. Java has built-in Image I/O API in javax.imageio package and it can be used to load external image formats into its BufferedImage formats. By default, Image I/O supports…

Send Bulk Emails Using Java

Introduction This tutorial shows how do you send bulk emails at once. This tutorial uses one method sendEmail(), which takes only one parameter – MimeMessage. This email sending example can be used to send different types of messages, such as, text, html, etc. Even you can send file attachements using this example.

JMS Client using JBoss 7 – Publish/Subscribe Messaging

This example will take you through step by step on practical implementation how you can configure a JMS Client using JBoss Application Server 7.1.1. I won’t discuss theoretical part here but if you need to know JMS related various keywords then you can go through the tutorial at https://roytuts.com/configure-jms-client-using-glassfish-3/ Publish/Subscribe Messaging System In a publish/subscribe (pub/sub) messaging system, clients address…

JMS Client using JBoss 7 – Point-To-Point Messaging

This example will take you through step by step on practical implementation how you can configure a JMS Client using JBoss Application Server 7.1.1. I won’t discuss theoretical part here but if you need to know JMS related various keywords then you can go through the tutorial at https://roytuts.com/configure-jms-client-using-glassfish-3/ In point-to-point messaging system there are only one sender(sends message) and…

Java transient modifier

In Java we have interesting modifier called transient to handle somewhat specialized situations. When an instance variable is declared as transient then its value need not persist when an object is stored to the persistence storage. Transient variables cannot be persisted during serialization. A transient variable is a variable that can not be serialized. the transient keyword can be used…

Google Chart using JSP, Servlet

Here I am going to show you how to display data on Google Pie Chart using JSP and Servlet. You know that Google chart basically displays different statistical data on different chart types such as column chart, bar chart, line chart, pie chart etc. You can have a look at the URL https://developers.google.com/chart/ for more information. You can integrate Google…

JSF 2 javax.faces.application.ViewExpiredException

Introduction JSF 2 javax.faces.application.ViewExpiredException that arises due to the click on a link or button when session gets expired. This tutorial will show you how we can deal with ViewExpiredException or view expired exception and we will show a meaningful message to the user with a link which will take him/her to the appropriate page instead of showing such technical…

Custom annotation example in Java

Introduction This tutorial shows, what is an annotation and how to write a custom annotation. I have taken the below concepts from Oracle documentation from the link http://docs.oracle.com/javase/tutorial/java/annotations/basics.html. Annotations, a form of metadata, provide data about a program that is not part of the program itself. Annotations have no direct effect on the operation of the code they annotate. Annotation…

Creating Liferay webservice project

In this tutorial I will show step-by-step how to create a Liferay plugin project. This plugin project is all about creating webservice in liferay. Prerequisites Liferay Developer Studio 1.4, Liferay 6

Accessing Liferay webservices remotely

In this post I will show how to call plugin webservice remotely. If we have wsdl file then we can generate the client or stub from wsdl file and invoke the operations/methods of the service. Before reading this post I would suggest please go through Creating Liferay plugin webservice project