Справочник Пользователя для IBM Version 5

Скачать
Страница из 340
218
 
The XML Files:   Development of XML/XSL Applications Using WebSphere Studio
Figure 10-2   Customer registration scenario outline
Retrieving customer information
When retrieving customer data, the user enters the membership number of the 
customer whose information is to be retrieved in the form provided by the HTML 
in the client layer. When the user clicks the Submit button, a series of interactions 
between system components take place, as indicated in Figure 10-3 on 
page 219,
 and in the following steps:
1. The HTML sends that value to the servlet through the HTTP request to the 
servlet, invoking the servlet doGet method.
2. The servlet validates that the user has entered a membership value. Then the 
servlet invokes the findByPrimaryKey method that belongs to the 
CustomerFactory class, using the input membership value. 
3. The CustomerFactory retrieves the data from the database, and constructs a 
customer entity bean setting its attributes with the values returned from the 
database.
4. The servlet provides the returned entity bean to the CustomerXML, which 
converts that bean into a DOM representation. 
HTML
DB
DB
HTML
1
2
Customer 
(Entity Bean)
Customer 
Factory
XML Data
XSLT
Processor
Customer XSL
Customer 
Result XSL
Web
Browser
9
10
Customer XHL
(DOM)
7
3
6
4
5
9
XSL Servlet