Skip directly to searchSkip directly to the site navigationSkip directly to the page's main content

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;
  1. static content - requests for files that exist and are served up by the application server, and
  2. 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
  &parameter_2_name=parameter_2_value
  . . . 
  &parameter_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.
  1. User makes a request
  2. Request hits Java app server via "http://server_address_or_dns_name:IP_port". The Java app server determines the application by using an application context map. In the Tomcat Java app server it has a configuration file (config/server.xml) that contains among other settings, an application context to the application's deployment directory.
  3. The web application (based on the context) is then handed the request. The application control first checks for servlet filters and wraps the request and response as applicable. Servlet filters are controlled with URL mappings. These mappings and filter control properties are specified in the application's "web.xml" file (located within the application's "WEB-INF" directory. See the filters page for more information about the IBIS-PH View System's Filters. The order the filters are listed corresponds 1:1 with the order which the filters are applied in the filter chain.
  4. The application's Java servlets are then called. Again specified and controlled with URL mappings like the filters in the "web.xml" file. The IBIS-PH View System uses only one servlet - the Spring Framework's Web MVC RequestDispatcher servlet. This servlet is not part of the IBIS Java code. It exists as part of the Spring Web MVC Framework.
  5. The servlet init parameter named "contextConfigLocation" controls the RequestDispatcher's main configuration properties. This property contains "/WEB-INF/config/spring/dispatcher_servlet.xml". This property file specifies a special Spring MVC Web bean object named "SimpleUrlHandlerMapping". This bean configuration also contains a list mapping of URL to controllers.
  6. The Spring Web MVC Framework is centered around the Spring Controller, the Spring Model, and the Spring View interfaces/objects. The RequestDispatcher uses this SimpleUrlHandlerMapping object to look up which controller should handle which request based again on the URL. The controllers can either handle the response or return a Spring Model and View object which are then used by the servlet to return a response to the requester. The IBIS controllers typically contain some logic/business rules to determine which XML document/data file to be used (model). The view object to use is typically the transformation engine with the XSLT being specified by as a property of the view.
  7. The RequestDispatcher servlet uses the Model and View object returned by the controller call to create the response to the user's request.

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

The information provided was retrieved on: Fri, 19 July 2019 19:59:15.

Content updated: Wed, 4 Nov 2015 09:26:28 MST