JSP Tag Libraries

Скачать в pdf «JSP Tag Libraries»


We use the <connection> tag for creating a connection to the data source. We will then use the <query> tag for creating and running a query that should give us all categories currently in the category table. We output the result with the use of the <enum> tag.


We use the <with> and <test> tags for checking whether or not a category image should be displayed, as well as switching between background colors to achieve aa two-color list.

Product list


The product list view displays a list of all available products in a given category. As with the category list, the view will retrieve and display the information needed.


The <connection> tag will serve for creating a connection to the data source and a <query> tag for creating and running a query that tells us all products currently available in the selected category. The result will be output with the use of the <enum> tag of the database tag library. We will use the same tags to receive the name of the currently selected category.


The <with> and <test> tags shall check whether or not a category image is to be displayed. These tags are also used to switch between background colors to achieve a two-color list. These tags will also serve to decide whether or not the current user should be able to order the listed products, depending upon whether the user is logged on.


A <currency> tag will need to be created for displaying the product prices with the local currency. The tag should be able to fetch the currency in the form of a string representing a locale from the servlet Context, so that we don’t have to specify the locale in each view needing currency formatting.

Скачать в pdf «JSP Tag Libraries»