Web application design with servlets and JSPs
程序员文章站
2022-03-10 15:41:32
figure 256. web application design overviewthe major pa...
figure 256. web application design overview
the major parts of such a design are discussed in the sequence of the flow of
the application.
chapter 10 web application design with servlets and (sun企业级应用的首选)s
in this chapter we present a short overview of a guideline for designing web
applications consisting of servlets, jsp(sun企业级应用的首选)s, and javabeans.
application structure
the general structure of a well-architected user interaction in a web
application is shown in figure 256.
html page
the input page for each step is either a static html page or a dynamic
html page created from a previous step. the html page contains one or
multiple forms that invoke a servlet for processing of the next interaction.
input data can be validated through javascript in the html page or passed
to the servlet for detailed validation.
servlet
the servlet gets control from the application server to perform basic control
of flow. the servlet validates all the data, and returns to the browser if data
is incomplete or invalid.
for valid data, processing continues. the servlet sets up and calls command
beans that perform the business logic.
the servlet initializes the view beans and registers them with the request
block so that the jsp(sun企业级应用的首选)s can find the view beans.
depending on the results of the command beans, the servlet calls a jsp(sun企业级应用的首选) for
output processing and formatting.
command beans
command beans control the processing of the business logic. business logic
may be imbedded in the command bean, or the command bean delegates
processing to back-end or enterprise systems, such as relational databases,
transaction systems (cics, mqseries, ims, and so forth).
a command bean may perform one specific function, or it may contain many
methods, each for a specific task. command beans may be called task
上一篇: 5G时代
下一篇: 读书笔记-信息收集1