Goodbye Log4j

After seeing so many students in last four years, I have decided to write this article about the new loggers which are widely being used by the industry. Almost all the university students I have seen are familiar with Log4j 1.x (at least heard about it) but most of them even did not hear about SLF4J and Logback. The purpose of this article is introducing SLF4J and Logback and convincing you towards them. Before getting into the topic, be informed that Log4j 1.x is not being maintained after August 5, 2015 and Ceki Gülcü the developer of Log4j came up with the new tools SLF4J and Logback. Technically, Logback is an enhanced successor of Log4j and performs better than Log4j.

He did a good job, but we have to move forward.
Read More

Apache Axis2 - Hello World! using Eclipse

The previous article Apache Axis2 - Hello World! provides step by step guide to develop a very basic Axis2 Hello World application without using any IDEs. This article helps you to create a simple application in Axis2 using Eclipse IDE.

Prerequisite:
  • Eclipse IDE for Java EE Developers (Follow this link to install Eclipse)
  • Apache Tomcat (Follow this link to install and integrate with Eclipse)
  • Apache Axis2 (Follow this link to install and integrate with Eclipse)

Update (01/05/2017): With the Axis2 library 1.7.4 there are some JSTL related errors in the JSP file. If you get such errors in your project, add the jstl-1.2.jar into the WebContent/lib directories.

Step 1:
Create a new Dynamic Web Project named HelloAxis2 and change the Dynamic web module version to 2.5 because the current version of Axis2 core does not support versions higher than 2.5.


Read More
Apache Axis2 - Hello World!

Apache Axis2 - Hello World!

Apache Axis2 is a SOAP processing engine and its main function is to deliver incoming SOAP messages into target applications, and in this context application is a Web service. This tutorial provides step by step guidance on how to create your first Hello World application.

Prerequisite:
  • Java Development Kit (Follow this link to install on Ubuntu)
  • Apache Axis2 (Follow this link to setup on Ubuntu)

Step 1:
Create a new class HelloService as shown below.
public class HelloService {

    /**
    * This method will be the add operation of the web service.
    */
    public int add(int x, int y) {
        int ans = x + y;
        return ans;
    }

}


Read More

Import Database with Images in Android

The article Import and Use External Database in Android explains, how to distribute an Android application along with the data stored in SQLite database. This tutorial explains, how to store images in such a database and pack it in your application. In other words, we are going to create a database with images from our desktop computer and import it into an Android application.

Step 1:
Create a database "images.db" using your favorite SQLite database application (I use Sqliteman because it allows inserting images into the database. You can use any software or script to insert the images into the database). Create a table 'places' with a two columns 'name' and 'image'. Here the data type of 'name' is TEXT and data type of 'image' is BLOB. Insert the name and image of  some places into the database. In this example, I have inserted the names of the seven wonders of the world along with a compressed (Using TinyPng) picture of them. To download the images used in this project, Click Here.


Read More

Contact Form

Name

Email *

Message *