How to set up android development environment?

android-icon

This tutorial describes how you can set up a development environment for building Android applications in Eclipse IDE. In my future articles, I will be writing about the various programming techniques and features available in the Android development. Android is the leading Operating System in the smartphone market. This makes android is the most popular […]

What is SLF4J?

slf4j-logo

Logging is a common issue for development teams. And right now there are a lot of options on what exactly to use for logging in Java. The most famous frameworks are: Log4j, Logback, Commons-logging, java.util.logging. But what happens if we want to change a logging framework by another one, did we have to change the whole […]

How to get current username in Spring Security?

spring

In my earlier articles I have written about the basic spring security mechanism and how to use the login form to redirect the users. Before jumping on to the advanced details on spring security, lets learn about how to get the currently logged in user details. This example illustrates how to get the user details […]

Spring Security Login Form Example

spring

In my previous post I have written a very simple spring security example without any login form mechanism. This example has the slight modification to include the login form example for the authentication. The changes are reflected in the spring-security.xml file. If the user is not logged in, the request will be redirected to the […]

Spring Tutorials

spring

Last couple of years, JavaBeat has published more than 80 articles on the spring framework. We have a very good collection of basics and advanced articles and tutorials on the spring framework. Javabeat is one of the good source for learning the spring technology. This post collects all the articles published earlier into a single […]

Spring Security Basic Example

spring

Spring security is one of the robust security framework provided by Spring community. It is very easy and simple to configure the set up. Spring security has been released its first version on 2003, over the period of years it has become more matured and defacto standard for the spring applications. All the spring web […]

Example for a class implementing comparable interface in Java

When you need some sort of ordering for the classes which you define, you will be going either for a comparable or comparator interface. Consider this example package test; import java.util.*; public class TreeSetTest { private static Set<Person> s = new TreeSet<Person>(); public static void main(String a[]){ s.add(new Person(20)); s.add(new Person(30)); s.add(new Person(10)); s.add(new Person(50)); […]

Quartz Job Scheduler – Example Code

quartz-thumbnail

In this section we are going to develop a simple Quartz Scheduler application with the help of Quartz framework. That will display Hello World Quartz Scheduler :date & time on the console window after specified time schedule. Before using Scheduler you have to instantiate it. For doing this some users may keep an instance of […]

What is load on startup element in web.xml file

specify the order in which we want to initialize various Servlets. Like first initialize Servlet1 then Servlet2 and so on. This is accomplished by specifying a numeric value for the  <load-on-startup> tag. <load-on-startup> tag specifies that the servlet should be loaded automatically when the web application is started. The value is a single positive integer, […]

Hibernate XML configuration file example