Sr. Developer

Q11.)How to implement /etc/mapping ?

Resource mapping is used to define redirects, vanity URLs and virtual hosts for AEM. You may view the mapping definitions at http://:/system/console/jcrresolver

In a standard installation of AEM you can find the folder:


This is the structure used when defining mappings for the HTTP protocol. Other folders (sling:Folder) can be created under /etc/map for any other protocols that you want to map. e.g.–

  1. Create a new node at /etc/map/http of the Type sling:Mapping and name is map1.
  2. Save the Node.
  3. Add Properties–
Name sling:match                   Name sling:internalRedirect  
Type String                        Type String  
Value localhost.4503/              Value /content/

Read More 

Q12.)What is the use of VaultClipse plugin for Eclipse ?

VaultClipse plugin for Eclipse has really streamlined the code deployment process for local development.You may still use Maven to build and deploy content packages when you’ve done quite a few changes or pulled new code from our teams shared code repository, but for daily coding you can use mostly VaultClipse to keep thing moving quick. For VaultClipse to work you must first install Adobe CQ’s FileVault.

FileVault is a command line tool that can transfer nodes and documents between…

  • Local File System -> CQ Repository (Import)
    • Locally files are stored in the Adobe CQ Zip Package format representing nodes and documents, source code and images etc. When you ‘Import’ these into the Adobe CQ repository they become Nodes with Properties and sub-nodes with jcr:data nodes containing the source code images and other files.
  • CQ Repository -> Local File System (Export)
    • Nodes / Documents / other files in the Adobe CQ repository are pulled out and put in a folder on your operating system’s filesystem. Nodes are transformed into folders with the folder name being the node name and the node properties stored in a .content.xml file inside the folder. Files like .jsp / .css / images etc are pulled out and placed in a mirrored folder structure relative to how they are stored in CQ. Component dialog nodes are pulled out as dialog.xml files with all the dialog fields and properties stored inside the xml file. (once you start working with the nodes in XML you may prefer it for most tasks, i do.)
  • CQ Repository -> CQ Repository (Vault rcp)
    • This can be used to synchronize data between two different CQ servers. I use it to pull the repository content of our web pages and DAM items down to my local and back to our DEV and QA instances from Production.

Read for Steps to Install VaultClipse

Q13.)What do you understand by Dependency Injection ?

Dependency Injection design pattern allows us to remove the hard-coded dependencies and make our application loosely coupled, extendable and maintainable. We can implement dependency injection pattern to move the dependency resolution from compile-time to runtime.

Dependency injection pattern seems hard to grasp with theory, so please read a simple example and then we will see how to use dependency injection pattern to achieve loose coupling and extendability in the application. Read More Other link

In Terms of CQ5, the simplest way to have dependency injection with Apache Sling, and the one used throughout the codebase, is to use the maven-scr-plugin .

You can annotate your java classes and then at build time invoke the SCR plugin, either as a Maven plugin, or as an Ant task.

@Component // signal that it's OSGI-managed
@Service(Servlet.class) // register as a Servlet service
public class SampleServlet implements Servlet {   
   @Reference SlingRepository repository; 
// get a reference to the repository    

Q14.)Why design_dialog content stores under etc/designs/project namespace ? How it recognizes to store there itself ? Can we store in some other place ?

Designs are stored under /etc/designs. The path to the design to be used for a website is specified using the cq:designPath property of the jcr:content node.


The designs has to be present under /etc/designs  , but the project structure can be defined using the above mentioned property (/etc/designs/).

No it cant be stored at another location than /etc/designs , because than the currectDesign object wont be able to resolve the designs defined for the application.

Q15.)What is Query Builder and its API ?

This link defines it all related to Query Builder:

Q16.)What do you understand by DAM API ?

Below some information related to DAM API . It covers everything you may need to know related to DAM :

To get the metadata in a simple fashion, you can use the standard sling json representation:

For example:

Docs on metadata:

There is also the Sharepoint connector for JCR as a separate product,
which might be useful if there is a Sharepoint involved:

If you need further custom code on the CQ side to provide e.g. new
servlets / JSPs that expose dam assets in a custom way, here are some more

General docs:

CQ DAM API (Java):

Some more (developer) info on extending DAM:

Q17.)What is a personalization?

Personalization provides your users with a customized environment that displays dynamic content selected according to their specific needs.

There is an ever-increasing volume of content available today, be it on internet, extranet, or intranet websites.

Personalization centers on providing the user with a tailor-made environment displaying dynamic content that is selected according to their specific needs; be this on the basis of predefined profiles, user selection, or interactive user behavior.

There are three main elements involved in personalization:


  • have profiles, both individual and group. These profiles contain characteristics (such as job description, location, interests) which can be used to personalize the content they can see.
  • take actions. These can then be analyzed and matched against behavior rules to tailor the content they see.


  • is what the user wants to see. Preferably content of interest and use to them for fulfilling their tasks.
  • can be categorized, and therefore made available to users according to predefined rules.must be dynamic; in other words the content
    must, in some way, be dependent upon the user – if every user would see the same content, then personalization would be redundant.


  • define how personalization actually happens – which content the user can see, and when.

Read More

Q18.)What is Social collaboration in AEM ?

CQ5 Social Collaboration is an extension to CQ5 Web Content Management (WCM ) from Day Software that provides social software and collaboration capabilities. It brings the authoring and management of blogs and wikis into the WCM and in addition provides a calendaring option, support for iGoogle gadgets, and ‘social profiling’ of users. The package is aimed at companies that are looking to take advantage of social Web developments to increase the depth and reach of the online experience that is offered by their Web sites and to increase the relevance of their Web content. The CQ5 Social Collaboration software is Java standards- and Open Services Gateway initiative (OSGi)-based with flexibility and interoperability built into it. CQ5 Social Collaboration added to CQ5 Web Content Management allows organisations to manage more aspects of their Web sites from within an integrated package.

Social Communities unifies all social networking and collaboration applications within AEM, including:

Q19.)Stat file and it’s relevance ?

The /statfile property identifies the file to use as the statfile. Dispatcher uses this file to register the time of the most recent content update. The statfile can be any file on the web server.

The statfile has no content. When content is updated, Dispatcher updates the timestamp. The default statfile is named .stat and is stored in the docroot. Dispatcher blocks access to the statfile.

The basic principle is that the last modification of a stat-file is compared to the last modification of content file. If the stat-file has been modified after the content file, the content file is stale and needs to be refetched. This refetching includes an update of the last-modifcation date to the current date. Otherwise the cached file can be delivered as up-to-date content.

The cache mirrors the content structure of the content in CQ. Using the statement “\statfileslevel” in the dispatcher.any file you can specify the depth for which these stat-files are created. If the dispatcher receives an invalidation request, it calculates the directory in which the files are which should be invalidated. If the directory in which this file is doesn’t contain a stat-file the dispatcher goes up in the directory structure until a stat-file is found. Then this stat-file is touched setting the last modification time to now. (If there are also stat-files in directories below the one of the file which is invalidated, they are also invalidated.)

If a requested file is contained in the cache, the dispatcher looks for a stat-file. If there is no stat-file in the directory of the to-be-delivered file, the dispatcher checks recursively the higher directories for a stat-file until it finds one. Then the last-modification times are compared and acted accordingly (as described above).

Q20. ) What is the primary purpose of Client libraries? What are dependencies and categories? How and where will you include a client library and why?

Typically, an HTML pages rely on JavaScript or CSS libraries that are executed in the web browser. CQ5 client library folders provide a mechanism for storing, organizing, and dynamically building and serving libraries on request. It helps to:

  • Store libraries in the repository.
  • Assign the libraries to different categories.
  • Reference the categories in your JSP pages, which generates links to the HTML libraries.

The ability to categorize libraries enables you to create logical groups of libraries, providing the flexibility required for projects that involve distributed development teams. The primary purpose of Client Libraries is to help in minification and faster rendering of a page.


In order to reference the libraries, we use the value of the categories property of the cq:ClientLibrary node. eg, the /etc/clientlibs/foundation/jquery node is of type cq:ClientLibraryFolder with a categories property of value cq.jquery. The following code in a JSP file references the libraries:

Dependencies :

When the code in your client library folder references other libraries, identify the other libraries as dependencies. In the JSP, the cq:includeClientLib tag that references your client library folder causes the HTML code to include a link to your generated library file as well as the dependencies.

Include ClientLibraries: 

As a standard practice of a webpage, your CSS should be included in the headlibs and the JS should be included in the footlibs. You should include your clientlibraries in a similar scenario , to have an optimized page performance.



5 thoughts on “Sr. Developer

    • In my opinion a Responsive Web Design (RWD) is the design to opt for creating a versatile website these days. These kind of design helps in two major ways:

      Focus. The problem with a lot of mobile sites is that they’re too cluttered. They try to pack as many features from the desktop site as possible onto a much smaller screen. That screen then becomes busy, unsightly, and difficult to navigate. Mobile-first design focuses on the site’s core content and functionality, providing users with the features they need without a lot of extras that increase load times and decrease usability on mobile platforms. Blueprint/ Livecopy approach increases the complexity of the site and hence difficult to manage henceforth.

      Versatility. Not only do your smartphone users get a site that’s streamlined and functional, but since site features and content are added progressively, tablet and desktop users aren’t faced with a bare bones layout that looks empty on a larger screen. Everyone gets the site that’s best suited to their device. That way, your site can reach a broader audience, increasing your traffic and providing more and better opportunities for people to interact with your site, no matter where they are. In case of Blueprint /Livecopy approach you have to relay a lot on the rollout configs and there is a burden to maintain that . Also the extra components and node structures are a head on burden. All this could be avoided using a RWD.

      Mobile-first responsive web design isn’t necessarily easy. It can be a challenge to limit the initial site design to a much smaller piece of screen real estate and hone in on that core content, especially for Web developers who are used to desktop design. But in the end, it’s a smarter, more versatile option for your site that gives every user just what they need.


  1. Pingback: How to Prepare ? – CQ5 AEM Tricks of Trade

  2. I have a question related to rating,poll or voting components .If the number of users which are submitting the poll components are large like 1M then would the method of creating the node for each user as answer
    slow the cq processing . What should be the strategy for defining these component when the users count is high should I use rdms to capture the answers and then manipulate the records to generate the result or is there any other strategy available in cq5?


    • Hi Aditya,
      Is this a Custom component or an OOTB component ? If the poll is added to a high traffic page, creating a User on Publish and synchronizing that user to all environments might not be a good idea. Do you have a condition that 1 user can vote /poll once ? You can manage client side cookies or some unique identifier like email id or zip code to get genuine users only.

      Liked by 1 person

Leave a Reply to Jitendra Bansal Cancel reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s