Posts Tagged ‘WebCenter Sites’


Introduction:

Oracle has introduced a new feature called Vanity URL in Oracle WebCenter Sites 11.1.1.8.0, which provides us the ability to define and manage the VANITY URLs for any asset. In this post, we will discuss about how to enable the Vanity urls in the ContentServer, and its usage.

 1)Creation of Vanity URLs for Assets:

Vanity URLs for an asset  can be created in two way, Manually and Auto-Generated. WebCenter Sites supports two types of Vanity Urls ie Asset URLS and Blob(File) Urls. An Asset Url can be either auto-generated(pattern defined by the Administrator in Admin Interface) or created in the Contributor Interface). A Blob (File) Url is created only by the Administrator in Admin Interface using pattern, but Blob(File) url cannot be created from Contributor UI.

 i) Manually creation from the Contribute UI:

From the Contribute UI, vanity URL can be created by Content Contributors. Open the asset for which you wish to create a Vanity url. Access the asset’s edit view in the Form mode. In the form section selector, select URL. Fill the following fields.

URL :   Enter the vanity url.

Host :  Form the dropdrown, select the root url.

Template : Select the layout to render the asset on the website.

After enter click the “Add” button, then the vanity URL is displayed. The Vanity URL will not work, until the asset is “Saved”.

 ii) Auto-Generated Vanity URLs:

Vanity URLs can be generated automatically for individual assets based on the patterns configured. Once a pattern is registered, the vanity URL is generated when the asset is saved.

Login to the Admin UI and under Admin tab, expand the AssetTypes node, then expand the node for the specific asset type you are creating and auto-generated URL. Expan the URL Pattern and double click on “Add New”

Name :  Unique name for the pattern.

Site  : The pattern will be applied for the list of sites for which the asset type is enabled.

Host : The WebRoot which the vanity URL applied to.

Pattern : Enter the rule that define the vanity URL. The pattern define will be appended to the WebRoot which is mentioned in the HOST attribute, for this pattern to create Oracle provided pre-defined functions like

i)${subtype.toLowerCase()}/${f:spaceToUnderscore(name).toLowerCase()}.html

So, the vanity url will be something like http://localhost:8080/cs/avi/samplesubtype/sample_by_krishna.html

ii)${id}.html

So, the vanity url will be something like  http://localhost:8080/cs/avi/1330543070443.html

ii)${name}.html

So, the vanity url will be something like  http://localhost:8080/cs/avi/sample+by+krishna.html

(Spaces are converted into + symbols by default)

AutoGenerate for Asset:  URL pattern generation of Assets vanity url.

AutoGenerate  for Blob(File): URL pattern generation of Blob File vanity url.

The Below section “Evalutate URL Pattern” in the above images, is used to validate the auto generate url.

2) To Enable the Vanity URLs in the Content Server]

By default, these would be enabled for first site II and avi sports sites.

2.1) Configure SitePrefix : The WebCenter Sites know which URLs to treat as vanity URLs. In the Content Sever web app enter the following filter. Do the setting in the Web.xml.

If there are multiple site, need to specify comma separated SitePrefix in the param-value tag.

Location : <>/webapps/cs/WEB-INF

Add this  filter just below the   “… WEM SSO Filter … ” entry.
<filter>
<filter-name>URLRewriteFilter</filter-name>
<filter-class>COM.FutureTense.Servlet.URLRewriteFilter</filter-class>
<init-param>
<param-name>SitePrefix</param-name>
<param-value>avi</param-value>
</init-param>
</filter>
<filter>
Add filtermapping just below  the filter-mapping of  “..WEM SSO Filter …” entry.
<filter-mapping>
<filter-name>URLRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

2.2) Create WebRoots:  Login to the Admin UI and under Admin tab, expand the WebRoots node and Add New. The WebRoots can be of Absolute , Relative or Combination.

HostName          : Enter the HostName which is unique identified for the WebRoot instance.

Root URL           : This can be Absolute or relative.

Virtual Root URL : If need to used the Virtual Url,  In futuretense.ini file for the property sites.environment specify the environment value as management/delivery.

It has two parameter the Environment and Root URL. For each environment will have one url,  enter environment name Root url and click add for

each environment.

Example : For Management environment, specify Environment = management,  Root URL = management.example.com

Sites                  :  Enable WebRoot for specific sites.

3) System tool – URL Utility:   

Login to the Admin UI and under Admin tab,  can view all the vanity URLs defined in the system. This tool can be used to resolve the conflicts in the vanity urls.    Using this “URL Utility” admin can view  the conflicting urls, and can delete the vanity urls which are not required.

4) Tags to get Vanity URL: 

     The normal tags can be used to get the Vanity URL. If the vanity url is present for the given asset then below tags will return the vanity url.

i)  render:gettemplateurl

ii)  render:getpageurl

ii)  render:getbloburl

iv) satellite:link

Advertisements

System Information Tool

The System Information tool provides access to various information like WCS information, database information, and thread information for troubleshooting and checking the health of your application.

We can either view information directly in the admin interface or download information to a file.

This tool consists of the following options:

  1. Sites Info
  2. DB Info
  3. Thread Info
Sites Info Node:

This node provides us the following facilities:

  1. Memory Information: This has the info about Total memory, free memory, etc.
  2. Option to download the WCS Property files like the .ini files
  3. Option to download the Webapp property files like the .properties, .xml files
  4. Info about Jar files available in Web-Inf/Lib folder
  5. Info about Session variables
  6. Info about System variables

sites information

DB Info Node:

This node provides us with the following information.

  1. Database Server Information
  2. JDBC Driver Info
  3. JDBC Driver Url
  4. JDBC Version
  5. JNDI Data Source
  6. Information about System Tables
  7. Information about Tree Tables
  8. Information about Object Tables
  9. Information about Other Tables
database info
Thread Info Node:

You can download or view thread dumps to analyze the runtime state of the application server. This can be especially useful when trying to detect problems that might result in resource starvation or thread hangs.

thread info

We will see about other tools in coming posts.


Oracle WebCenter Sites provides us with few tools that will be useful in our day-to-day activities as a developer like managing the page cache, asset cache, viewing logs, etc.

 The System Tools node on the Admin tab provides a range of diagnostic utilities that general administrators can use to troubleshoot directly from the WebCenter Sites administrator’s interface. Features include configuring log4j loggers, accessing various types of system information, managing caches, searching the contents of the WebCenter Sites log, and testing the performance of the shared file system.

One can find the SYSTEM TOOLS as follows in Oracle WebCenter Sites:

  1. Log into the Admin UI of Oracle WebCenter Sites.
  2. Go to ADMIN Tab in the tree.
  3. You will find a node called SYSTEM TOOLS at the bottom of the available nodes.

Double click on the SYSTEM TOOLS node to explore the various options provided by Oracle WebCenter Sites. Below screenshots shows the System Tools in Admin Tab.

System Tools

We will go through these system tools in upcoming posts.

Stay tuned….!


First things first. We need the following the components for integrating Oracle WebCenter Sites Devloper Tools with Eclipse:

  1. Latest Eclipse (Can be downloaded from http://www.eclipse.org/downloads/)
  2. CSDT plugin (Developer tools plugin)
Integrating Developer Tools with Eclipse

By following the below steps, we can integrate the Developer tools provided by Oracle WebCenter Sites with Eclipse.

  1. Download and Install WebCenter Sites JDK.
  2. Download the latest version of Eclipse, and install it.
  3. In the WebCenter Sites distribution package, there is a filde called csdt.zip. Unzip it.package. Open the csdt-eclipse folder and save the com.fatwire.csdt.eclipsecsdt_1.0.0.jar file to the plugins folder under your Eclipse installation
  4. Start your local instance of WebCenter Sites (JDK).
  5. Start Eclipse (eclipse.exe) and configure its settings according to your preferences.
  6. In the Eclipse menu bar, select Window > Open Perspective > Other … > Oracle WebCenter Sites.
  7. The configuration screen is displayed. In the configuration screen, fill in the following fields with the information for your WebCenter Sites instance
  8. In the “Sites Installation Directory” field, click Browse to select the directory containing the futuretense.ini file for the WebCenter Sites instance.
  9. In the “Username” field, enter the user name of a general administrator. This user must be a member of the RestAdmin group.
  10. In the “Password” field, enter the password for the user name you entered.
  11. In the “Project name” field, enter a name for the project on which you will be working.
  12. In the “Sites Log File” field, enter the location of your log file (for example, C:/ WCS/logs/sites.log).
  13. The Configuration screen looks as below:Config Screen
  14. Click OK.

 

Configuration is now Complete. Now, the “Oracle WebCenter Sites” perspective opens.  The Oracle WebCenter Sites perspective looks as shown in the below image:

Eclipse IDE

Now you can create and play with templates, elements etc, from eclipse, then sync them with WCS and enjoy coding. Happy Coding 🙂

Related Articles