Wednesday, October 2, 2013

Enabling guest browsing and shopping in the Elite starter store WCS-7 FEB 6 in Development environment

By default, guest customers cannot browse the Elite starter store or add items to existing orders in the Elite starter store. To allow guest customers to browse the store or to add items to a current order, enable guest browsing and shopping in the Elite starter store.

To enable guest browsing and shopping in the Elite starter store, Please go through below URL.

http://pic.dhe.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.elite-starterstore.doc/tasks/tsmeliteguestshopping.htm

Note: After enabled guest customers and browse the Elite starter store in WCS-7 FEB6, we have to hit store URL like as below

http://localhost/webapp/wcs/stores/servlet/StoreView?storeId=10153

but It's taking to logon page, instead of home page. so there is small code changes need in index.jsp page. To find the code snippets and correct the test condition parameter.

as per OOB code will be 


<c:when test="${!userType eq guest}">
              <wcf:url var="homePageUrl" patternName="HomePageURLWithLang" value="TopCategories1">
                <wcf:param name="langId" value="${langId}" />
                <wcf:param name="storeId" value="${requestScope.storeId}" />
                <wcf:param name="catalogId" value="${requestScope.catalogId}" />
                <wcf:param name="urlLangId" value="${langId}" />
              </wcf:url>       

</c:when>

To remove the "exclamation mark" which marked in RED color.  try now, it will go to home page. 


Displaying non-english characters correctly with WebSphere

Did you faced issue while displaying non-english characters/special characters likes [currency symbols] dollor, pound etc ?

Try this solution:
    • Select Servers ->Application Server ->server name ->Process Definition ->Java Virtual Machine ->Custom Properties –>New
    • Type client.encoding.override in the Name ; Type UTF-8 in the Value column.
    • Click Apply.
    • Stop and restart the WebSphere Application Server

Sunday, September 1, 2013

Collecting data for problems with WAS JSP container

When debugging problems related to JSP files, it is often important to get the generated java source for the JSP.

The generated java source for all newly compiled JSP files will be stored in the JSP scratch directory.

Profile_Root/temp/node_name/server_name/EAR_App_Name/WAR_APP_Name/temp 

1. Development phase using RAD.

a. Open the deployment descriptor for the Web Application.
b. Go to Extensions tab.
c. Add a new jsp attribute with name="keepgenerated" and value="true".
d. Save all changes.

2. If you have already deployed your application and are using JSPBatchCompiler to compile JSPs, then you can specify the keep generated option for the JSP batch compile

Run the following JSPBatchComplier command"-

Run the JspBatchCompiler.sh or JspBatchCompiler.bat on the failing JSP with -keepgenerated option as per the following example. The -keepgenerated option will generate _*.java file while compiling JSP to _*.class file. To determine the enterpriseapp.name and webmodule.name.

JspBatchCompiler 

install_root/profiles/profile_name/bin/JspBatchCompiler.sh -enterpriseapp.name application_name -webmodule.name webapplication_name -cell.name cell_name -node.name node_name -server.name server_name -filename jsp_file -keepgenerated true -forceCompilation true -log.level FINEST > jspbatchcompiler.out 2>&1

3. If the application is already deployed and you do not want to use the JSP Batch compiler, you can modify the configuration file to do the same as in step 1, above

a. Edit the ibm-web-ext.xmi located in WEB-INF file for the installed Web application.
    Edit file in:- WebSphere_Home/config folder
b. Add the line as shown below, indicated by bold and underline, after the webApp element in the same file:

<webappext:WebAppExtension xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:webappext="webappext.xmi"
xmlns:webapplication="webapplication.xmi"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmi:id="WebAppExtension_1"
reloadInterval="3"
reloadingEnabled="true"
additionalClassPath=""
fileServingEnabled="true"
directoryBrowsingEnabled="false"
serveServletsByClassnameEnabled="true">
<webApp href="WEB-INF/web.xml#WebApp"/>
<jspAttributes xmi:id="JSPAttribute_1"
name="keepgenerated" value="true"/>
</webappext:WebAppExtension>

4. Enable trace log on WAS.

For WAS V7.0:

*=info:com.ibm.ws.webcontainer*=all:
com.ibm.wsspi.webcontainer*=all:
HTTPChannel=all:GenericBNF=all:
com.ibm.ws.jsp=all

Tuesday, August 27, 2013

List of WCS site

B2C:

www.thenorthface.com
www.llbean.com
www.iconfitness.com
www.edwinwattsgolf.com
www.arcadiagroup.co.uk
www.sears.com
www.nokiausa.com/buy-online                        
www.ikea.com
www.argos.co.uk
www.moosejaw.com
www.sonystyle.com
www.panasonic.com
www.usa.canon.com
www.darty.com

B2B

Endorsia                        www.endorsia.com
Staples                          www.staples.com
Seagate Technolog         www.seagate.com
Roche Diagnostics         www.Roche-Diagnostics.com

How to clear the WebSphere class caches

IBM Support, may ask you to clear the class cache. There are several reasons for this. After an upgrade, it is possible that the class cache's are still holding onto previous versions of classes. It is also possible that the caches became corrupted.
Please remember there are two caches that will need to be cleared, the JVM's cache and the OSGi cache. The server has to be stopped before clearing the cache.

 To clear the OSGi class cache:
For UNIX platforms, run the following script in each profile:
<WebSphere_HOME>/profiles/profile_name/bin/osgiCfgInit.sh

 To clear the JVM's class cache (Windows, Linux and AIX only) :
For UNIX platforms, run the following script:
<WebSphere_HOME>/bin/clearClassCache.sh

How to enable Oracle JDBC Driver tracing with WebSphere Application Server v7

This document describes how to enable Oracle JDBC driver trace when using a datasource in WebSphere Application Server v7

Symptom

When debugging WAS + Oracle connection problems, it sometimes becomes necessary to enable Oracle JDBC driver tracing.

Resolving the problem

-Doracle.jdbc.Trace=true -Djava.util.logging.configureByLoggingPropertiesFile=true -Djava.util.logging.config.file=C:\WAS70\AppServer\profiles\AppSrvXML\logs\server1\OracleTrace\OracleTracing.properties

Forgot websphere admin console password

When you enable the security on WebSphere Application Server [WAS], it will prompt you for authentication when you access admin console, stop server and wsadmin prompt. As we discussed earlier in other blog post about WebSphere Security, all the security related settings are stored in config file under Profile_root/config/cells/cell_name.  File name is security.xml. The workaround when the administrator forgot the password is to change the security settings by manually modifying the security.xml file
  1. Locate the security.xml file and take a backup of it.
  2. open security.xml file for editing and search for enabled=”true
  3. modify it to enabled=”false” [you need to do this only for the very first occurrence of enabled=”true” ]
  4. Restart the servers
    1. Note: since you do not have the password you cannot stop the servers, so use KILL command
  5. Log into admin console
  6. Enable Security again
  7. Restart the servers.

Tips of Command context

At run time, each requested JSPs includes the EnvironmentSetup.jsp or EnvironmentSetup.jspf file. The command context is retrieved from this file.

some more soon.............

Do not want to restart WAS every time a properties file is changed

Nice feature available in WAS

We normally change properties files during development time, so need to restart server to impact the changes, how to properties file changes effect without restart server.

appropriate properties file location under the following directory.

stores\properties\com\ibm\commerce\tools\

1. Open wc-server.xml file
2. Change the value of developmentMode to "true". the default value is "false".
2. Restart WAS.


Sunday, July 7, 2013

Displaying additional starter stores FEB5+ which was available FEB4-



In FEB5+, the Aurora starter store replaces the Madisons starter store used in the previous release (FEB4-). 

The following starter store not available to the publish wizard by default.
  • Madisons.sar
  • Madisons-FEP.sar
  • Madisons-enhancements.sar
  • SocialCommerce.sar
  • MadisonsStorefrontAssetStore.sar
  • MadisonsStorefrontAssetStore-FEP.sar
  • MadisonsMobile.sar
  • MadisonsMobileEnhancements.sar
  • MadisonsTablet.sar
These SAR files can be made available for use:-

Procedure for development environment: - 

1     1. Create the following directory structure:
     WCDE_installdir/conf/sar

           Note: The conf directory does not exist by default. You must create this directory in the installation  directory for WCS development environment before you create sar directory.

2     2.Navigate to the  following directory:
     WCDE_installdir/starterstores

Navigate through the subdirectories to locate the SAR file that you want to publish.

                     
3. Copy the SAR file that you want into the directory you created in step.
4. The file is now available for publishing in the Administration Console. Start publish.....

Procedure for  Server environment: - 

1    1. Create the following directory structure:
     WC_installdir/instances/instance_name/sar
2     2. Navigate to the  following directory:
     WC_installdir/instances/instance_name/startersores

Navigate through the subdirectories to locate the SAR file that you want to publish.

                     

3. Copy the SAR file that you want into the directory you created in step.
4. The file is now available for publishing in the Administration Console. Start publish..... 

Tuesday, June 18, 2013

Configuring the Quick Publish scheduler to run a job on an instance or cluster member

Procedure

Step-1
  1. Log onto the WebSphere Administrative Console.
  2. Select Servers > Application Servers.
  3. Select your WebSphere Commerce Server name. For example, server1.
  4. On the Application Servers panel, under the Server Infrastructure heading, select Java and Process Management > Process Definition.
  5. On the Process Definition panel, under the Additional Properties heading, select Java Virtual Machine.
  6. In the middle window, on the right hand side under the Additional Properties heading, select Custom Properties.
  7. Click New. A new page opens for you to add additional JVM properties.
  8. In the Name field, enter com.ibm.commerce.scheduler.SchedulerHostName.
  9. In the Value field, enter the unique identifier of the scheduler instance on this Java process.
  10. In the Description field, enter the host name parameter for this scheduler instance to use.
Step-2

Update the value of the quick publish JVM name attribute in the wc-resource-containers.xml file.
a.Open the WC_profiledir\installedApps\cell_name\WCServer_enterprise_archive\xml\content-management\wc-resource-containers.xml file for editing.
b.Locate the <wc:QuickPublishConfiguration> element, and add the jvmName parameter as shown:
<wc:QuickPublishConfiguration>
<wc:Publisher className="com.ibm.commerce.context.content.resources.publish.De
faultJDBCContentPublisherImpl"  initParameters=[other-parameters]
jvmName="QPHostname" [other-parameters]/ >
</wc:QuickPublishConfiguration>

Wednesday, February 6, 2013

How to disable workspaces, if needed after enabled

Workspace can't be disabled after they are enabled during instance creation. workspace is created, we can't remove database schema associated with workspace. however, we can prevent business users from using workspaces by preventing workspaces from displaying in the MC.

modify the instance file as follows:

WC_installdir/instances/<instance_name>/xml/instance.xml

1. search for WorkspaceTaskList and set the enabled parameteer to false.

after makeing this change, the line look like this:

<component enabled="false" name="WorkspaceTaskList"/>

this setting for workspaceTaskList component disables the workspace function within the tools:


2. After changes are complete, run theUpdateEar ant task to reflect the change on the app server.