Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Implementing mobile WebSphere Commerce

Mike Callaghan (mcallagh@ca.ibm.com), WebSphere Commerce Support Analyst, IBM
Author1 photo
Mike Callaghan is a Staff Software Engineer at the IBM Toronto Lab, Canada. He has been part of the WebSphere Commerce Support team since 2005, specializing in runtime components. He was also part of the DB2 Development Infrastructure team, specializing in UNIX scripting and automation. He graduated with Honors from McMaster University, Canada, with a Bachelor's degree in Software Engineering
N Krishnan (nkrishna@in.ibm.com), WebSphere Commerce Consultant, IBM
Author photo
N Krishnan is an IT Specialist working at the IBM India Software Labs, India. He was part of the WebSphere Commerce development team and currently working as a consultant in IBM Software Services for WebSphere. He was also part of developing retail solutions in the Retail EBO team.
Nicolai Nielsen (nicolai.nielsen@uk.ibm.com), WebSphere Commerce Consultant, IBM
Photo of Nicolai Nielsen
Nicolai Nielsen is a Senior IT Specialist at IBM Hursley Software Lab, United Kingdom. He has been with the WebSphere Commerce Technology Practice of IBM Software Services for WebSphere since 2006. Before that, he worked as a WebSphere Commerce consultant with IBM Global Services Denmark.

Summary:  This tutorial will take you through an implementation of WebSphere® Commerce storefront for a mobile device. It will show how to create a servlet filter to detect the device used and then map to a specific Struts action. It will also show how to cache based on the device format.

Date:  03 Jun 2009
Level:  Intermediate PDF:  A4 and Letter (1259 KB | 49 pages)Get Adobe® Reader®

Activity:  16874 views
Comments:  

Before you start

The current trend in online shopping has retailers targeting customers wherever they are, whichever device they are on, rather than being restricted to a traditional desktop. You will go through one implementation of WebSphere Commerce specifically for a mobile device. This tutorial highlights many of the key concepts of how to use the WebSphere Commerce Struts framework to support different displays for each mobile device. You will learn to implement a servlet filter to detect each device and then map it accordingly to a new Struts action. You will also force the display type based on your preference. Finally, you will learn how to cache the pages based on the device format.

Objectives

  • Implement a servlet filter to detect the type of device submitting the request.
  • Create views for specific devices.
  • Switch between mobile and non-mobile views on the storefront.
  • Use Dynacache to cache the views based on device type.

Prerequisites

This tutorial is intended for WebSphere Commerce developers. Knowledge of Struts, strorefront JSPs, and servlet filters is useful, but not required.

System requirements

This tutorial requires the use of a mobile device simulator to test the results. You will need to find a simulator, for example, by searching for one via the Internet. We used an Apple® iPhone® simulator in our practice. The assumption is that the simulator allows you to enter a URL from the local server. This tutorial will provide the URLs to enter into the mobile device simulator.

This tutorial will also assume an IBM WebSphere Commerce Developer v6.0 environment is being used. There is no dependent fixpack or feature pack level.

The out-of-the box ConsumerDirect sample store is used throughout the tutorial.

Duration

2 hrs

Getting started

Extract the provided MobileCommerceCode.zip to a temporary location because you will reference this location as MobileCommerceCode\ from now on.

1 of 10 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=392975
TutorialTitle=Implementing mobile WebSphere Commerce
publish-date=06032009
author1-email=mcallagh@ca.ibm.com
author1-email-cc=dwu@us.ibm.com
author2-email=nkrishna@in.ibm.com
author2-email-cc=dwu@us.ibm.com
author3-email=nicolai.nielsen@uk.ibm.com
author3-email-cc=dwu@us.ibm.com

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.