Spring 3 security siteminder pre-authentication example
Java interview question: Why Strings are immutable?
Struts 2 hello world with annotations
[SOLVED]: Unable to find a result type for extension [properties] or [xml]
How to correctly set result path in struts 2
JavaScript: Correct way to define global variables

We know that what global variables or constants are, these are fields which are accessible application wide. In java, it is done usually done using defining “public static” fields. Here by adding final keyword, we can change the global variable to global constant. So easy, right? But what about javascript?...
Read more »
Struts 2 custom interceptor with @InterceptorRef example

In previous posts, we learned the hello world applications and setting result path for struts 2 applications. Now, moving ahead in this post, I am giving an example of custom or user defined interceptor configuration using annotations. An interceptor is a class whose pre-defined method is called each time, a...
Read more »
[Solved] Unable to find interceptor class referenced by ref-name

I came to know of this feature while writing code for @InterceptorRef example. I had to declare interceptor definitions in struts.xml file whereas I wanted to use the interceptor using annotations. On first attempt, It failed with following error: Unable to load configuration. - [unknown location] at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)...
Read more »
5 Reasons You Should Consider Migrating Your Legacy Systems

Organizations don’t like to leave their legacy system easily as there are several concerns for moving into a new platform. Latest technologies may have the features to improve their operational efficiency, but moving from one platform to another is not as simple as it seems from the top. Further, some...
Read more »
Hibernate example of insert/select blob from database

In previous hibernate tutorials, we have learned about first level cache, second level cache and some various mapping examples etc. This is complete list of hibernate related tutorials. In this post, I am giving an example of inserting BLOB data into database using hibernate and getting this data from database,...
Read more »
Visitor design pattern example tutorial

Design patterns are used to solve the problems which occur in a pattern, we all know that, right? Also we know that behavioral design patterns are design patterns that identify common communication patterns between objects. One of such behavioral patterns is visitor pattern, which we are going to learn about...
Read more »
A birds-eye view on “how web servers work?”

Many times we wonder that how a web container/ web-server (e.g. tomcat or jboss) works? How they handle the incoming http requests coming from all over the world? What are the things which make it happen behind the scene? How java servlet API (i.e. classes like ServletContext, ServletRequest, ServletResponse and...
Read more »
How to read data from InputStream into String in java

This is very common requirement in several type of applications where you have you read data from network stream or from file system and do some operation on it. If you are using java.nio package then for reading a file, you can read some effective ways my post: 3 ways...
Read more »
SerialVersionUID in java and related fast facts

In java, serialization is the process of turning an object-in-memory into a stream of bytes so you can do stuff like store it on disk or send it over the network. De-serialization is the reverse process: turning a stream of bytes into an object in memory. In my earlier post...
Read more »
Instances of same class can access private members of each other

From this post onwards, I will spend few days in sharing some little known (if not unknown) features of java language, which we either don’t knew before or didn’t care to think differently. I will really appreciate if all you guys participate in discussion with your thoughts. And for being...
Read more »
Usage of class sun.misc.Unsafe

This post is next update in sequence of discussions regarding little known features of java. Please subscribe through email to get updated when next discussion goes live. And do not forget to express your views in comments section. Java is a safe programming language and prevents programmer from doing a...
Read more »
Checked exceptions thrown in initializer blocks can be declared by the constructors

This post is in continuation to exploring little known features of java. In previous post, I have covered “Instances of same class can access private members of each other” and Some very surprising usage of class sun.misc.Unsafe. In this post, I am discussing about a little known feature of initializes...
Read more »
Instanceof operators don’t need explicit null checks

This post is part of series on little known features of java. Earlier posts covered instances accessing private members from same class, usage of class sun.misc.Unsafe and checked exception thrown through constructors for initializer blocks. In this post, I am discussing about a very common practice adopted by beginner level...
Read more »
Labeled statements in java

Welcome back to my next post in series of less known java features. If you are new to this series, I would like to encourage you to read previously discussed features e.g. usage of sun.misc.Unsafe, SerialVersionUID and related facts, Instanceof operators don’t need explicit null checks and Checked exceptions thrown...
Read more »
How to create splash window using java SWT

Splash window is introductory screen which is shown to the user, by the time application is loading on background. Splash screens cover the entire screen or simply a rectangle near the center of the screen. Usually, a progress bar is also shown along with splash window which indicates how much...
Read more »