Display design pattern

Display pages return a response to a client. Typically, display pages are implemented as JSP pages.

In order to support multiple device types, a URL access to a page should use a view name, not the name of the actual JSP file.

The main rationale behind this level of indirection is that the JSP page represents a view. The ability to select the appropriate view (for example, based on locale, device type, or other data in the request context) is highly desirable, especially since a single request often has multiple possible views. Consider the example of two shoppers requesting the home page of a store, one shopper using a typical Web browser and the other using a cellular phone. Clearly, the same home page should not be displayed to each shopper. The Web controller's responsibility is to accept the request, then based upon information in the command registration framework, determine the view that each shopper receives.


Related concepts
Model-View-Controller design pattern
Command design pattern
WebSphere Commerce useBean tag
JSP pages and data beans


Related reference
JSP programming best practice: Use JSTL in place of Java code
WebSphere Commerce JSP programming best practices