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