Monday, July 6, 2015

EJB file commit in SVN

Issue : Which all file need to commit in SVN after creating new EJB

Following files need to be committed :

1. No file need to committed which start with "_"
2. File name start with EJS also no need to be committed.
3. Updated: \WebSphereCommerceServerExtensionsData\ejbModule\META-INF\ibm-ejb-access-bean.xmi
4. Updated: WebSphereCommerceServerExtensionsData\ejbModule\META-INF\ejb-jar.xml
5. Updated: WebSphereCommerceServerExtensionsData\ejbModule\META-INF\ibm-ejb-jar-ext.xmi
6. Updated:WebSphereCommerceServerExtensionsData\ejbModule\META-INF\backends\DB2UDBNT_V82_1\<Your DBM Files>.dbm
7. Updated: WebSphereCommerceServerExtensionsData\ejbModule\META-INF\backends\DB2UDBNT_V82_1\ibm_pmbab.properties
8. Updated: WebSphereCommerceServerExtensionsData\ejbModule\META-INF\backends\DB2UDBNT_V82_1\Map.mapxmi
9. Updated: WebSphereCommerceServerExtensionsData\ejbModule\META-INF\ibm-ejb-jar-bnd.xmi
10. 

Wednesday, July 1, 2015

Shortening the context root of a store URL

Shortening the context root of a store's URL makes it easier for shoppers to remember a link and also improves visibility in search engine results.

You can change the default site URL from http://hostname/webapp/wcs/stores/servlet/StoreName/index.jsp to something shorter, such as: http://hostname/shop/StoreName/index.jsp. In this example, shop is used to replace the context root, but any name can be used in its place.
Here the requirement was different, and we need not to display context root in the URL at all, the context root replacement value should be blank.

For example:
Old URL: http://hostname/webapp/wcs/stores/servlet/StoreName/index.jsp
New URL: http://hostname/StoreName/index.jsp

To achieve this functionality we need to update below files:
httpd.conf
wc-server.xml
httpd.conf changes:

If you are running an IBM HTTP Server:
Open the httpd.conf file for editing.
Locate the virtualhost object: <VirtualHost servername:80> Insert the following code inside the <VirtualHost servername:80> object before the ending </VirtualHost> tag.

***********************************************
NOTE:

xyz is DNS

 RewriteEngine on

ServerName  www.xyz.com
ServerAlias  www.xyz.com


RewriteCond %{HTTP_HOST} ^xyz.com$
RewriteCond %{REQUEST_URI} ^(/en/myobof/(.*)|/en/myobof)
RewriteRule ^/(.*) /webapp/wcs/stores/servlet/$1 [PT,L]
******************************************************
 RewriteRule ^/(.*)$      /webapp/wcs/stores/servlet/$1 [PT,NC]
Locate the virtualhost object: <VirtualHost servername:443> Insert the following code inside the <VirtualHost servername:443> object before the ending </VirtualHost> tag.

 RewriteEngine on
 RewriteRule ^/(.*)$      /webapp/wcs/stores/servlet/$1 [PT,NC]
wc-server.xml changes:

Open the wc-ser.xml for editiong.
Search for the SEOConfiguration section.
Update the  element as given below (update the context-root-rewrite with "/").
     <SEOConfiguration defaultUrl="" dynamicUrl="true" enable="true">
        <context-root-rewrite value="/" />
    </SEOConfiguration>
  

  Now you are done with the changes Restart your web server and app server and validate your changes.



Refrence : Shortening the context root of a store URL