WebSphere Commerce useBean tag

The useBean tag instantiates a WebSphere Commerce data bean and automatically populates it for you. A new programming direction has also been undertaken with our starter stores that now use the JavaServer Pages Standard Tag Library (JSTL) to perform view logic, instead of Java code. At the same time, business logic has been moving into data beans. The combination of these steps allows for less Java code in a JSP page.

The useBean tag takes the following attributes:

In order to be able to use the new useBean tag library, a JSP page must first be told how to locate the tag. In order to locate and use the new tag, the following line must be located at the top of the JSP file:

This line will make the useBean tag available to the JSP page with the prefix of wcbase.

The following are examples of using the useBean tag:


Related concepts
Display design pattern
WebSphere Commerce framework overview


Related tasks
Use resource bundles in store pages


Related reference
JSP programming best practice: Use the Commerce-specific tag for bean activation