Struts 2 Action Chaining example

In Struts 2, sometimes you may want to process another action when one action completes. For example on successfully submitting a form you want to render output from other action. This is called Action...

How to Redirect Standard Output/Error in Java

System.out and System.err stream objects are mapped to “standard” output and error stream respectively. By default, Java display standard output/error on display console. Thus, when we print a statement using System.out: It prints the...

Read / Write Excel file in Java using Apache POI

Read / Write Excel file in Java using Apache POI

Apache POI is a powerful Java library to work with different Microsoft Office file formats such as Excel, Power point, Visio, MS Word etc. The name POI was originally an acronym for Poor Obfuscation Implementation,...

How to update JSTL Locale dynamically

How to update JSTL Locale dynamically

When you use JSTL format tag <fmt:formatDate> and <fmt:formatNumber>, JSTL automatically takes care of locale resolution. Depending on the browser’s locale setting JSTL will display the date and numbers. You may want to override this default behavior....

Android Preferences Activity example

Android Preferences Activity example

Android application often needs settings that allow users to modify preferences in app. Android provides a powerful framework to manage user preferences. It allows us to define the way we want preferrences and it...

Java: How to Load CSV file into Database

Java: How to Load CSV file into Database

Loading CSV file into Database can be cumbersome task if your Database provider does not offer an out of box feature for this. Most of the time you’ll spend up in creating valid insert...