Posts Tagged ‘Web Experience Management’

Apache Sling is one of the core technologies used in Adobe Experience Manager (formerly known as Adobe CQ / Day CQ).

Sling started as an internal project at Day Software, and taken up by Apache in September 2007. It’s the reason why some bundles/libraries are named like

The other important technologies include Apache Jackrabbit, Apache Felix, OSGi. We will discuss about the Apache Sling in this article, and how to create a sample content and consume it.

Apache Sling is a web framework that uses a Java Content Repository (like Apache Jackrabbit) to store and manage content. Sling applications use either scripts or Java servlets to process HTTP requests in a RESTful way.

Sling in very simple terms could be described as a REST API for JCR. We can use http requests to manage content inside the repository. Sling provides a mechanism to render that content in different ways. We can use JSP, ESP scripts, Java (servlets, pojos, etc) in the Felix container to process requests and deliver content.

When a request is made for a particular node, Sling looks up for a property called sling:resourceType. This is used to look up the rendering scripts for the requested resource.

Apache Sling is:

  • a REST based web framework
  • Content-driven, using JCR
  • Powered by OSGi framework
  • an Apache Open Source project

We shall see an example of how to start, create node and read the node’s content from Sling.

  1. Download Apache Sling Launchpad self-runnable jar from In my case, I have downloaded the latest jar
  2. After the jar is downloaded, just start it as follows:
    java -jar
  3. This starts the Sling embedded Web Server on port 8080 and writes application files into the sling folder found in the current working directory of your choice. You can check http://localhost:8080/system/console/bundles to see if the application is started properly or not. The credentials would be admin/admin. Here you would see different bundles in started state.
  4. Create content by giving the below cUrl command:
    curl -u admin:admin -F "sling:resourceType=training/aem" -F "title=Sling for AEM" http://localhost:8080/content/myaemnode

            We can expect a response as below:

Screen Shot 2016-07-26 at 6.42.54 PM

Now check the content by using the below URLs from web browser.

Content node in HTML format: http://localhost:8080/content/myaemnode.html

Screen Shot 2016-07-26 at 6.46.47 PM

Same node in JSON format: http://localhost:8080/content/myaemnode.json

Screen Shot 2016-07-26 at 6.45.52 PM

No doubt, WebCenter Sites has provided a great tool called CSExplorer in JSK for exploring the Database contents. But this tool has limitations. This works only on the Windows environments. But in reality, developers work on different environments aswell like MAC, Linux, etc.

I really felt bad when I couldn’t find someway to explore the database contents. while working on MAC. Fortunately, I have gone through some other website, and came to know how to explore the HSQLDB using eclipse.

I want to explain now how to explore the underlying tables of WCS using Eclipse, more elaborately.

Step  1 :

Open your server.xml file. It can be found under the below location:

[WCS installation Dir ]/apache-tomcat-7.0.42/Sites/conf/server.xml

Get the below values:

  • Username
  • Password
  • URL

See below screen shot.


Step  2:    

Have your eclipse installed. You can get it from

Step  3:     

Download the Data tools platform from eclipse marketplace. To do this, go to the Eclipse market place window, and search for ECLIPSE DTP (DATA TOOLS PLATFORM) 1.11.1 KEPLER, and install the plugin.


 Step 4:     

Now open the Perspective ” Database Development“.

You can do this by going to the Eclipse -> Window -> Open Perspective -> Other – > Database Development

Step 5: 

In the left hand, you will see a new tree opened called DATA SOURCE EXPLORER.

Right click on DATA CONNECTIONS, and click on NEW.


 Step 6:    

You will now get the following CONNECTION PROFILE window. Select HSQLDB from the available list of options, and click on NEXT button:


 Step 7:    

Enter the DB connection details in the below window:

Enter the following values from the inputs taken in step 1.

  • Database Location  : [WCS Installation Dir ] /App_Server/apache-tomcat-7.0.42/Sites/default/data/hypersonic/csDB
  • UserName  :   sa
  • Password    : blank

Then click on the TEST CONNECTION button. It shows a PING SUCCESSFUL dialog box. Now click on FINISH button.

DB Info Screen

NOTE:  You need to add the hsqldb.jar in the above window, by clicking on the + button available against the DRIVER  drop down.

Step  8:  

That’s it. In the Data source explorer tree of left hand side, you can see a new DB connection created to your local JSK. You can explore the tables as shown in the below screenshot.




That’s it for now.





In Oracle WebCenter Sites, when we create a site, few tables will be created by the Content Server.  These tables will be used by the CS to write information about the sites that are created in the system. Following are the tables that will be created.

  1. Publication Table
  2. PublicationTree Table
  3. SitePlanTree Table
Publication Table:

This table is used by the CS to store all the info related to the sites that are created in your system. This holds the information like NAME, DESCRIPTION, PUBLICATION ID of the site. Each row in this table resembles a site in your system, and its information.

publication table

PublicationTree Table:

This table is used by the CS to store the information about the asset types that are enabled for your site.  It stores the information about the different asset types that you have created  / shared from other sites in your system.

SitePlanTree Table: 

This table stores information about the hierarchical structure of a site and its page assets. This table lists sites and page assets. We can code your CSElements to extract and display information from the SitePlanTree table

There will be a top level node (Page), which will have the rest of the pages placed below it.

The SitePlan in the Admin console of WCS resembles this table in database.

SitePlanTree table

Types of Database Tables

We will now discuss about the Database tables in Fatwire. There are five different types of tables in the Content Server database:

  1. Object tables
  2. Tree tables
  3. Content tables
  4. Foreign tables
  5. System tables
Object Tables

These tables hold the data as objects and provide a unique identifier for each row in the table. Object tables store data as an object and can be represented in hierarchies. The primary key for object tables is always the ID (id) column and that cannot be changed. When we add an object table, it creates an ID column automatically in that table.

Tree Tables

These tables hold the hierarchical information about relationships between objects in object table, i.e., the object tables can be represented in hierarchies, but the hierarchy itself is stored in a tree table — the hierarchy is the tree.

The examples of tree tables are:

  1. AssetRelationTree
  2. SitePlanTree
Content Tables

Content tables store data as flat data (rather than as objects) and that information cannot be organized in a hierarchy. You use content tables for simple lookup tables. The CS doesn’t provide a unique identifier for the rows in the table.

Foreign Tables

A foreign table is one that Content Server does not completely manage. These can be the tables which can be:

Tables that are outside of the Content Server database but that Content Server has access to.

Tables that are in the Content Server database but that Content Server did not create.

Content Server can query foreign tables and cache the resultsets just as it does for its own object and content tables.

System Tables

These are core Content Server application tables. The schema of these tables cannot be modified, i.e., these are the Content Server tables whose schema is fixed. You can add rows to some of the system tables (say using the Content Server Explorer tool or using some other way), but you cannot add or modify the columns in these tables in any way. Also, we cannot add system tables to the database.

The examples of System Tables are:

  1. ElementCatalog
  2. SiteCatalog
  3. SystemACL
  4. SystemInfo
  5. SystemPageCache
  6. SystemUsers .. etc…
How to know the Table’s Type:

We can identify the type of any table using the SystemInfo table. The system table is the one that lists all the tables in the database.

Following are the steps to identify the Table’s type:

  1. Open the Content Server Explorer and log in to the Content Server database.
  2. Open the SystemInfo table.
  3. Examine the systable column. The value in this column identifies the type of table represented in the row. Refer the screen below:


Here are the codes for identifying the tables:

  1. YES = System table
  2. NO = Content table
  3. OBJ = Object table
  4. TREE = Tree table
  5. FGN = Foreign table

Now, we are going to see the usage of CatalogMover tool of Fatwire / Oracle WebCenter Sites 11g.

CatalogMover is a tool which is used to export / import the database tables. We can even export the ElementCatalog and SiteCatalog tables. We can export all the assets like page assets, content assets, etc., and import all of these assets into another system (target system). We can export / import all the database tables as HTML / ZIP files. This tool can be used with Windows machine by the Windows Interface. In the rest of the operating systems, it can be used through the Command Line Interface. The advantage of CatalogMover over CS-Explorer is that this tool can be used in any operating system.

We can do the following activities with CatalogMover.

  1. Export Tables: Exporting is the process of retrieving table rows and their content from the database and saving them in local HTML files and associated data directories.
  2. Import Tables: Importing is the process of sending locally stored HTML files and the associated data to the server. You can select a particular HTML file to import, or you can choose to import all HTML files.

To Start the CatalogMover, Execute the following scripts at the MS DOS prompt or in a UNIX shell:

  • For Windows: CatalogMover.bat
  • For Solaris:

Following is the screenshot of CatalogMover.



WEB EXPERIENCE MANAGEMENT (WEM) is one of the branches of CONTENT MANAGEMENT SYSTEMS. It is emerging as an alternative to WCM, which only concentrates on creation of online content. Whereas WEM concentrates on creation of online content along with giving the new experience to the online businesses by marketing the products to the customers of specific interests.

For example, lets consider an e-commerce site. One customer might be interested in purchasing electronic peripherals, where as some others might be interested in purchasing outfits, etc. So, according to the customers taste, the marketing needs to be done.  If a customer who is interested in electronics is sent a mail from the marketing department related to some unnecessary things he isnt interested, its of no use.

Not only marketing, when a user logins to a site, he will be presented with all the articles available with the site. But if the user is presented with the products which he is interested on the top, and the rest of the products in low priority, then the main purpose of the business might become easy. All this can be achieved with WEB EXPERIENCE MANAGEMENT.

What is difference between WCM and WEM?

While WEB CONTENT MANAGEMENT (WCM) only deals with managing the online content, WEB EXPERIENCE MANAGEMENT (WEM) deals with the management of the customers taste along with the WCM part. Hence, We can think of WEM as an extension to WCM.

How WEM helps an organization?

WEM (Web Experience Management) helps an organization in many ways providing effective  web presence by providing a dynamic and interactive portal where business users can easily login and update their content and also help the organization in a great deal providing them to do target marketing campaigns, which can convert prospects into customers.