Author Archive

Dynamic templates – 2

Creating template definition

The template folder structure contains three pages which are template, template-types, and policies. First, we are going to see template-types, then policies and finally templates.

Under the template-types page, we need to create template definitions the template …

Dynamic templates – Part 1

We know that the advantage with WCM is we can create pages without depending on the developer, but the problem here is the pages which you create using templates are pre-defined. Suppose if you want to create a new layout …

AEM Code Snippets : How to get Page object based on path ?


In this code snippet, I am going to explain how to get page object by passing page path, in the activate method get the path and assign it to the local variable, you need to pass this local variable …

Exception handling in Java


What happens when the program or software throws several errors or not responding to end user while using software which was built by you, the people who are using your software gets frustrated and they will not come back to …

Java try-catch block


In my previous article, I have explained about exception handling, in this article, I am going to explain to you how to use try-catch block in Java

Let me take a simple example, the code which you see below will  …

Java multiple catch blocks


In my previous article, I have explained about java try-catch block, in this article, I am going to cover how to use multiple catch blocks in Java exceptions handling

You can handle multiple exceptions by using multiple catch blocks, but …

Java : Log error messages with Log4j

In this article, I am going to cover how to log error messages, here I am using log4j logging framework, first you need to update POM with the below dependency

Step 1: