Configure a Web application
All major aspects of a Web application are configured declaratively by means of Struts configuration files.Action-mappings, global-forwards, message-resources, data-sources, form-beans, global-exceptions, and so forth, are among key elements found in Struts configuration files. (Refer to the Struts User Guide for the complete list and details.) Of these, WebSphere Commerce extends the semantics for action-mappings, global-forwards, and message-resources, as detailed in the following sections.
- Define WebSphere Commerce error message resources: message-resources
- Representing view implementations: action-mappings and global-forwards
- Mapping URLs to controller commands: action-mappings
WebSphere Commerce uses multiple Struts configuration files. There can be multiple configuration files defined for each Web module. Each Web module can be tailored to a custom configuration for its purpose:
- InitializationServlet
- The Web module that initializes the WebSphere Commerce application. This Web module also contains commands that will be executed through non-Web channel, such as the scheduler, WebSphere MQ, and so on.
- Stores
- The Web module for WebSphere Commerce stores.
- CommerceAccelerator
- The Web module for the WebSphere Commerce Accelerator, a browser-based component that use to operate and maintain WebSphere Commerce stores.
- OrganizationAdministration
- The Web module for the WebSphere Commerce Organization Administration Console, a browser-based component for administering people, groups, organizations, and associated security elements.
- SiteAdministration
- The Web module for the WebSphere Commerce Administration Console, a browser-based component that allows complete administrative operations at the site or store level.
- Representing view implementations: action-mappings and global-forwards
Describing device-specific and store-specific view implementations, accomplished in earlier versions of WebSphere Commerce using the VIEWREG database table, is accomplished in the WebSphere Commerce Web application with a combination of action-mappings and global-forwards elements.- Mapping URLs to controller commands: action-mappings
Associating a URL with a controller command interface, accomplished in earlier versions of WebSphere Commerce using the URLREG database table, is accomplished in the WebSphere Commerce Web application with action-mappings elements.- Define WebSphere Commerce error message resources: message-resources
Retrieving error messages, accomplished in earlier versions of WebSphere Commerce using the StoreErrorDataBean, can also be accomplished in the WebSphere Commerce Struts-based Web application with the Struts declarative exception handling framework. This framework relies on property message resources (resource bundles) defined in properties files and configured in the Struts configuration files using message-resources elements.Related concepts
WebSphere Commerce Struts framework
WebSphere Commerce workspaceRelated tasks
Tutorial: Using Struts tags, action forms, and validation
Tutorial: Extending a Struts action
Customizing the Web application configuration
Updating the Web application configurationRelated reference
Example: Using the messaging system composition service
JSP programming best practice: Use the StoreErrorDataBean data bean for error handling