Month: May 2016
-
Access a resource property using an AEM bundle
In this session, we will learn about how to access resources using bundles deployed in the Felix console. After all, for Sling, everything is a resource. We will update the bundle we developed with a method that accesses a node and prints its title. Though it sounds very simple, we will learn about a very important…
-
Manage Sling requests using Java Servlets
In this session, we will see how to manage Sling requests using Java Servlets. Servlets are programs that run on a Web server and act as a middle layer between a request and a response. You can deploy Servlets in the Felix console and use them for managing the request from clients. An example: you need to print…
-
Create configurable parameters in an OSGi component
In this session, you will see how to configure values for various parameters in an OSGi bundle and obtain the same for further processing. We will also learn about ComponentContext object that helps to interact with a component. (As usual, it’s a continuation of the previous session. Obtain the latest package and project from GitHub.)…
-
Enable logging for a bundle
In this session, we will see how to enable logging for a bundle. We will later create a logger configuration in Felix console and will specify a file to write the logs. Enabling logging in a bundle helps you a lot while debugging. We will use Simple Logging Facade for Java (SLF4J). It’s an abstraction of various…
-
Convert an AEM Maven project to an Eclipse-based project
In the previous session, we created an AEM project based on an archetype. We explored the project, deployed it into the Felix console, and then accessed the service it exposed. In this session, we will convert the project into an Eclipse project. So that we can import the project into Eclipse. And, later use Eclipse as an IDE for…