JSP Tag Libraries

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


Represents a line of text that should be displayed to the user on the welcome view.


Represents an order created by a user. It has a total price and contains a number of OrderItems. It belongs to a customer.


Represents a single row in an order. It holds the SKU, name, price, and ordered quantity of a certain product.

14.3.3 View

Fifteen views make up the system. We will go through each in order to describe their intended usage.

Logon view

The logon view is displayed each time a user tries to access the application without being logged on. This is achieved by setting the access rights for the pages that should allow only registered users, and by defining this page as the login form. All of this is defined in the web.xml file. The view is made up of two different cards, in which the first card loads the second card.

Listing 14.1 is the source for the logon view. This file is called login.jsp inside the application.

Listing 14.1 login.jsp

<%@ page contentType=»text/vnd.wap.wml;charset=UTF-8″ %> О <%@ taglib

http://www.manning.com/jsptagsbook/simple-taglib» prefix=»simple» %>

<simple:nocache useHeaders=»true»


<?xml version=»1.0″?>




<card id=»image»

ontimer=M#loginM title=»Cosmetix»> <timer value=»100″/>


<img src=»images/logo.wbmp» alt=»Cosmetix»/>



<card id=»login»


<do type=»options» label=»Login»>

<go href=



<p align=»left»>

<input type=»text»

name =»use rname» format=»32A» title=»Username:»/>

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