View System Documentation - Request Flows
This page provides a description of how an HTTP request is processed by
the application. The intended audience includes project managers,
content developers, and web developers - or anyone who wants to know how
requests are dealt with. There are two types of requests;
-
static content - requests for files that exist and are served up
by the application server, and
-
dynamically generated content - requests that are mapped to and
handled by Java servlets.
This page focuses on dynamic content requests and details the specific
steps that a request follows to deliver a response to the user. In
general, dynamic content requests go through these steps:
- User makes a request (via a browser) to an application server/application
- Application server determines the application (via context mapping)
- Request goes through a filter chain (according to the filter request mapping)
- Request then is handed to the servlet (according to the servlet request mapping)
- Servlet looks up the appropriate controller object
- Servlet calls the controller object's "handleRequest" method
- Controller determines the appropriate XML data model and XSLT view
object then creates and returns a ModelAndView object
- Servlet then calls the returned ModelAndView object to get the view
- Servlet then calls the View object's "render" method with the model
passed as an argument
- View's render method does the XSLT/XML transformation and returns the response
- Filter/response wrapping is then given control as the response
bubbles back up through the filter chain (FILO)
- Response is streamed back to the user/browser that made the request
The next section provides a general discussion of a Java Application Server's
HTTP request URL. This discussion is provided to understand how the IBIS
application sees and handles requests. A general description of each type
of step in the request/response flow is then provided (General IBIS Request
Flow Overview). Following the flow overview is a series of tables which
provide details of each major type of IBIS-PH View System request. These
details include the Request Mapping, Filters applied, Spring Bean
Configurations, Java IBIS Controller used, the Model, and the View.
URL Request Anatomy
This section briefly discusses URL requests. There are two types of HTTP
requests; "get" and "put". Since most of the requests that the application
deals with are "get" type requests, that is what will be discussed in this
section (although "put" are similar). Get request URLs consist of six
segments; protocol, server address, application IP port, application
context, the resource with any path prefix information, and the parameter
name value pair(s). In general "get" request URLs are of the form:
protocol://address:port/context/resource
?parameter_1_name=parameter_1_value
¶meter_2_name=parameter_2_value
. . .
¶meter_N_name=parameter_N_value
A general request example of this form looks like:
http://ibis.health.utah.gov:8080/ibisph-view/query/result
?GraphicType=jpeg&GraphicName=StackedArea
An IBIS-PH View System "get" HTTP request example looks like:
http://ibis.health.utah.gov/home/welcome.html
Request URL Segments
protocol | http:// - most browsers automatically add this as
a prefix if omitted
|
---|
address | IP address or DNS name of the web/application server (ibis.health.utah.gov) |
---|
port | Optional IP port that the application listens on.
The default value is 80. For Utah, no port is specified so it
defaults to "80". In the general example above this value is
"8080".
|
---|
context | Application's address within that application
server. For Utah, the View system is the default application
and does NOT have a context identifier. In the general
example above, the context is "ibisph-view".
|
---|
resource | Application's resource with any path information
that is needed to identify the requested item. In the IBIS
example it is "home/welcome.html". In the general example it
is "query/result".
|
---|
parameters | Parameter name value pairs provide a special mechanism
to send additional information that an application server can
parse and use to create a unique, dynamically generated response.
Sometimes these parameter strings are called "parameter query
strings" or "URL request query parameters" etc.
|
---|
The first three segments of a request are very general and simply define
an address. The last three segments are all dependent on the application
that is listening on that IP port and how it is programmed. In the IBIS
environment the listening application is a Java application server which
hosts a web application typically known as "ibisph-view". The Java application
server then hands over control to the IBIS-PH View System application which
then determines what to do to handle the given requested resource (and any
optional parameters).
General IBIS Request Flow Overview
Listed below is a general, ordered list of the steps that are taken for
any request being processed by the application.
Listed below are tables that describes the major type of page requests
that the system typical deals with.
Home HTML Content Page Requests
Request Mapping | /home/*.html |
---|
Filters | artifact, compress |
---|
Bean Configurations | WEB-INF/config/spring/home.xml |
---|
Controller | Java: org.ibisph.mvc.controller. SystemIDFromEndOfPathInfoXMLModelAndDate
simple controller that pulls the XML filename from the
request resource path and filename. The actual XML filename
is dependent on the XML path property.
|
---|
Model | XML: xml/home/html_content/*.xml |
---|
View | XSLT: xslt/html/home/HTMLContentPage.xslt |
---|
Indicator Profile View Request
Request Mapping | /indicator/profile/view/*.html |
---|
Filters | SVG graphic type and path adjustment, artifact, compress |
---|
Bean Configurations | WEB-INF/config/spring/indicator.xml |
---|
Controller | Java: org.ibisph.mvc.controller. SystemIDFromEndOfPathInfoXMLModelAndDate |
---|
Model | XML: xml/indicator/profile/*.xml | View | XSLT: xslt/html/indicator/profile/ViewPage.xslt |
---|
Indicator Profile Chart Graphic Request
Request Mapping | /indicator/profile/graphic/*.jpeg |
---|
Filters | SVG graphic type and path adjustment (SVG to JPEG) adding
graphic type cookie), artifact, compress
|
---|
Bean Configurations | WEB-INF/config/spring/indicator.xml |
---|
Controller | Java: org.ibisph.mvc.controller. indicator.ChartGraphic |
---|
Model | XML: xml/indicator/profile/*.xml | View | Java: org.ibisph.mvc.view.Chart which uses Agileblox SVG
Chart Java object
|
---|
Indicator Profile Related Indicators Request
Request Mapping | /indicator/related/*/*.html |
---|
Filters | artifact, compress |
---|
Bean Configurations | WEB-INF/config/spring/indicator.xml |
---|
Controller | Java: org.ibisph.mvc.controller. indicator.RelatedIndicators |
---|
Model | XML: xml/indicator/profile/*.xml | View | XSLT: xslt/html/indicator/profile/RelatedIndicatorsPage.xslt |
---|
Query Module Selection Request
Request Mapping | /query/selection/**/*.html |
---|
Filters | artifact, compress |
---|
Bean Configurations | WEB-INF/config/spring/query.xml |
---|
Controller | Java: org.ibisph.mvc.controller. SystemIDFromEndOfPathInfoXMLModelAndDate |
---|
Model | XML: xml/query/module/*/*.xml | View | XSLT: xslt/html/query/selection/SelectionPage.xslt |
---|
Query Module Builder Request
Request Mapping | /query/builder/**/*.html |
---|
Filters | compress |
---|
Bean Configurations | WEB-INF/config/spring/query.xml |
---|
Controller | Java: org.ibisph.mvc.controller. query.Builder |
---|
Model | XML: xml/query/module/*/*.xml | View | XSLT: xslt/html/query/module/builder/ BuilderPage.xslt |
---|
Query Result Request
Request Mapping | /query/result/**/ResultPage.html |
---|
Filters | compress |
---|
Bean Configurations | WEB-INF/config/spring/query.xml |
---|
Controller | Java: org.ibisph.mvc.controller.query.Result |
---|
Model | XML: Module XML with selected parameters. | View | XSLT: xslt/query/module/result/ResultPage.xslt |
---|
Query Result Chart Graphic Request
Request Mapping | query/result/graphic/*.jpeg or *.svg where *=Chart Type |
---|
Filters | SVG graphic type and path adjustment, compress |
---|
Bean Configurations | WEB-INF/config/spring/query.xml |
---|
Controller | Java: org.ibisph.mvc.controller.query.ChartGraphic |
---|
Model | XML: Query Module XML document along with IBIS-Q XML result. | View | Java: org.ibisph.mvc.view.Chart which uses Agileblox SVG
Chart Java object
|
---|
Query Result Map Request
Request Mapping | query/result/graphic/Map.jpeg or *.svg |
---|
Filters | SVG graphic type and path adjustment, compress |
---|
Bean Configurations | WEB-INF/config/spring/query.xml |
---|
Controller | Java: org.ibisph.mvc.controller.query.MapGraphic |
---|
Model | XML: Query Module XML document along with IBIS-Q XML result. | View | XSLT: xslt/svg/query/Map.xslt |
---|
Admin System Publish Indicator Profile Request
Request Mapping | /publish/indicator/*.xml |
---|
Filters | security |
---|
Bean Configurations | WEB-INF/config/spring/indicator.xml |
---|
Controller | Java: org.ibisph.mvc.controller. indicator.PublishIndicator |
---|
Model | NA | View | NA |
---|
Saving User Survey to Admin System Request
Request Mapping | /home/SaveSurveyResponse |
---|
Filters | None |
---|
Bean Configurations | WEB-INF/config/spring/home.xml |
---|
Controller | Java: org.ibisph.mvc.controller.home.SaveResponse |
---|
Model | XML: xml/home/html_content/SurveyConfirmation.xml
| View | XSLT: xslt/home/HTMLContentPage.xslt |
---|