Pages

Wednesday, July 27, 2011

Stop Search Engines to Indexing your site

This is something unrelated to IBM WCS but I encountered a situation where I had to do this on a IBM WCS powered ecommerce site.
To prevent a Search Engine from indexing a page, place the code below between the <HEAD> and </HEAD> tags.


<META NAME="ROBOTS" CONTENT="NOINDEX,NOFOLLOW">

This tag tells the robots not to index this page and not to follow any links within the page.

<META NAME="ROBOTS" CONTENT="NOINDEX,FOLLOW">

This tag tells the robots not to index this page, but follow any links within the page.


Another way is to place a Robots.txt file under the webroot folder of the webserver with the following contents


User-agent: *
Disallow: /
 
This will disallow indexing on the whole site 

Wednesday, July 13, 2011

Creating JSON object in WCS

Websphere Commerce provides a jsp tag to make it simple to generate a JSON object. For example, a product JSON might have to be created depending on the business requirements.

The details of the jsp tag is given below
<wcf:json object="${productJSON}"/>

where productJSON is an object (generally a Map) which gets converted to a JSON object.

Map contains key value pairs which are translated to JSOn as below

{
   Map {
         color: red
         price:20
}
}

Tuesday, July 5, 2011

Finding which APAR is installed on your Commerce instance


To find if a particular APAR is installed or find all APARs those are installed on your websphere commerce instance, check for the file NIFStack.xml or NIFHistory in the following path

<<CommerceInstallPath>>\properties\version\update\backup