source: main/trunk/src/main/webapps/ibisph-view/WEB-INF/config/spring/dispatcher_servlet.xml @ 3710

Last change on this file since 3710 was 3710, checked in by Garth Braithwaite, 10 years ago

java and view - email verification code working. updated systemid modelmaps to use verified file, then the new resource then classpath system id lookup. many of the modelmap objects were changed from "XML" to the more generic "file". Renamed the saxon*.jars to include the exact version number.

File size: 12.9 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--
4        Spring MVC Dispatcher Servlet URL patterns to Controllers mappings.  This
5        is a special bean file that is specified for the Dispatcher Servlet via
6        a web.xml init param.  The servlet processes the beans specified by the
7        interface they implement.  So the beans can be named anything.
8       
9        Controller Naming Phiolsophy: Controllers are named generically in hopes of
10        limiting the changes that are needed to this file by an adopter.  For
11        example, to use a different publishing mechanism, an adopter would modify
12        the web.xml and load the approp publish*.xml spring application context
13        file.  The different publish app context spring bean config files would
14        have their publishing controllers named the same (what they are named in
15        this file) but would use different IBIS classes with different property
16        definitions.  So different bean configuration files need to have the assoc
17        controller samed the same so that this file does not have to be edited
18        when an adopter changes publishing mechanisms etc. 
19
20        This file should be changed/needs to be changed when the URL patterns or
21        controllers are different or when an adopter wishes to turn off certain
22        features and/or turn on others.  In these cases then the mappings need
23        to be changed and the adopter should place the file under their config
24        management.
25-->
26
27<beans default-lazy-init="false" default-autowire="no"
28        xmlns="http://www.springframework.org/schema/beans"
29        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
30        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"
31>
32
33        <!-- see 12.4 Handler mappings for some property options -->
34        <bean id="RequestDispatcher.URLToBean.Mapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
35
36                <!--
37                        The "alwaysUseFullPath" controls how the servlet matches the URL
38                        mapping.  From the docs: if true use the full path within the current
39                        servlet context. Else, the path within the current servlet mapping.
40                        Put another way if true use getRequestURI sans the servlet context
41                        path prefix to match, else use getPathInfo.
42
43                        For IBIS-PH the value is set to "true" so that the mapping is a more
44                        complete explicit URL which can provide a 100% sure and safe mapping
45                        to the approriate controller.  Also, using the full path is easier
46                        to maintain and understand as the web.xml servlet mappings do not
47                        impact the URL mapping key.  The property value has NO effect on the
48                        HTTP Request's getPathInfo() or getRequestURI value.  However, the
49                        getPathInfo's value is impacted by the web.xml's SERVLET MAPPINGS.
50                -->
51                <property name="alwaysUseFullPath" value="true"/>
52                <property name="pathMatcher"><bean class="org.springframework.util.AntPathMatcher"/></property>
53
54                <!--
55                        ORDERING: The best practice is to be order most specific to least.
56                -->
57                <property name="urlMap">
58                        <map>
59                                <!-- H O M E -->
60                                <entry key="/home/**"     value-ref="Home.HTMLContent.Controller"/>
61
62
63                                <!-- P U B L I C A T I O N S -->
64                                <entry key="/publications/index/Chronological.html" value-ref="Publications.ChronologicalIndex.Controller"/>
65                                <entry key="/publications/index/Topical.html"       value-ref="Publications.TopicalIndex.Controller"/>
66                                <entry key="/publications/**"                       value-ref="Publications.HTMLContent.Controller"/>
67
68
69                                <!-- I N D I C A T O R  -->
70                                <entry key="/indicator/index/Alphabetical.html"     value-ref="Indicator.AlphabeticalIndex.Controller"/>
71                                <entry key="/indicator/index/Categorized.html"      value-ref="Indicator.CategorizedIndex.Controller"/>
72
73                                <entry key="/indicator/view/*.html"                 value-ref="Indicator.View.Controller"/>
74                                <entry key="/indicator/important_facts/*.html"      value-ref="Indicator.ImportantFacts.Controller"/>
75                                <entry key="/indicator/available_services/*.html"   value-ref="Indicator.AvailableServices.Controller"/>
76                                <entry key="/indicator/related/*/*.html"            value-ref="Indicator.RelatedIndicators.Controller"/>
77                                <entry key="/indicator/other_resources/*.html"      value-ref="Indicator.OtherResources.Controller"/>
78                                <entry key="/indicator/complete_profile/*.html"     value-ref="Indicator.CompleteProfile.Controller"/>
79                                <entry key="/indicator/view_numbers/*.html"         value-ref="Indicator.ViewNumbers.Controller"/>
80
81                                <entry key="/indicator/graphic/**"                  value-ref="Indicator.ChartGraphic.Controller"/>
82
83                                <entry key="/indicator/**/*.html"                   value-ref="Indicator.HTMLContent.Controller"/>
84                                <entry key="/indicator"                             value-ref="Indicator.HTMLContent.Controller"/>
85
86
87                                <!-- Q U E R Y  -->
88                                <entry key="/query/selection/**"          value-ref="Query.Selection.Controller"/>
89                                <entry key="/query/configuration/**"      value-ref="Query.Configuration.Controller"/>
90                                <entry key="/query/builder/**"            value-ref="Query.Builder.Controller"/>
91                                <entry key="/query/submit/**"             value-ref="Query.Submit.Controller"/>
92                                <entry key="/query/result/graphic/Map/**" value-ref="Query.MapGraphic.Controller"/>
93                                <entry key="/query/result/graphic/**"     value-ref="Query.ChartGraphic.Controller"/>
94                                <entry key="/query/result/**/*.html"      value-ref="Query.Result.Controller"/>
95                                <entry key="/query/result/**/*.xls"       value-ref="Query.Result.Controller"/> <!-- put here so can plug in Excel specifici controller in the future. -->
96                                <entry key="/query/result/**/*.xml"       value-ref="Query.IBISQResult.Controller"/>   
97
98                                <entry key="/query/proxy*"                value-ref="Query.QueryApplicationProxy.Controller"/>
99
100                                <entry key="/query/**/*.html"             value-ref="Query.HTMLContent.Controller"/>
101                                <entry key="/query"                       value-ref="Query.HTMLContent.Controller"/>
102
103
104                                <!-- Q U E R Y   D E F I N I T I O N -->
105                                <entry key="/query/criteria/List.html"    value-ref="QueryDefinition.CriteriaList.Controller"/>
106                                <entry key="/query/definition/List.html"  value-ref="QueryDefinition.DefinitionList.Controller"/>
107
108                                <entry key="/apply/sticky/query/definition" value-ref="QueryDefinition.SetSessionStickyFlag.Controller"/>
109
110                                <entry key="/run/query/definition/**"    value-ref="QueryDefinition.RunDefinition.Controller"/>
111                                <entry key="/edit/query/definition/**"   value-ref="QueryDefinition.EditDefinition.Controller"/>
112                                <entry key="/apply/query/definition/**"  value-ref="QueryDefinition.ApplyDefinition.Controller"/>
113                                <entry key="/delete/query/definition/**" value-ref="QueryDefinition.DeleteDefinition.Controller"/>
114
115                                <entry key="/edit/query/builder/definition/**" value-ref="QueryDefinition.EditBuilderDefinition.Controller"/>
116                                <entry key="/edit/query/result/definition/**"  value-ref="QueryDefinition.EditResultDefinition.Controller"/>
117                                <entry key="/save/query/definition/**"         value-ref="QueryDefinition.SaveDefinition.Controller"/>
118
119<!-- run directly with name being specified as a get...
120<entry key="/query/definition/result/**/*.html" value-ref="QueryDefinition.DefinitionResult.Controller"/>
121<entry key="/query/definition/system/result/**/*.html" value-ref="QueryDefinition.SystemResult.Controller"/>
122-->
123
124                                <!-- S E C U R E  -->
125                                <entry key="/secure/selection/*.html"       value-ref="Secure.Selection.Controller"/>
126                                <entry key="/secure/query/selection/**"     value-ref="Secure.Query.Selection.Controller"/>
127                                <entry key="/secure/query/builder/**"       value-ref="Secure.Query.Builder.Controller"/>
128                                <entry key="/secure/query/submit/**"        value-ref="Secure.Query.Submit.Controller"/>
129                                <entry key="/secure/query/result/**/*.html" value-ref="Secure.Query.Result.Controller"/>
130                                <entry key="/secure/query/result/**/*.xls"  value-ref="Query.Result.Controller"/>       <!-- put here so can plug in Excel specifici controller in the future. -->
131                                <entry key="/secure/query/result/**/*.xml"  value-ref="Query.IBISQResult.Controller"/> 
132                                <entry key="/secure/query/configuration/**" value-ref="Query.Configuration.Controller"/>
133                                <entry key="/secure/query/selections"       value-ref="User.QuerySelectionList.Controller"/>
134
135                                <entry key="/secure"                        value-ref="Secure.Selection.Controller"/>
136
137
138                                <!-- C O M M U N I T Y -->
139                                <entry key="/community/snapshot/Builder.html" value-ref="Community.Snapshot.Builder.Controller"/>
140<!--
141                                <entry key="/community/snapshot/Report.html" value-ref="Community.Snapshot.Report.Controller"/>
142-->
143                                <!-- path: graphic/indicator view name/community name/community value.svg -->
144                                <entry key="/community/highlight/graphic/*/*/*.*" value-ref="Community.Highlight.ChartGraphic.Controller"/>
145
146                                <entry key="/community/highlight/index/*/*.html"  value-ref="Community.Highlight.Index.Controller"/>
147                                <entry key="/community/highlight/introduction/*/*.html" value-ref="Community.Highlight.Introduction.Controller"/>
148                                <entry key="/community/highlight/report/*/*.html" value-ref="Community.Highlight.Report.Controller"/>
149                                <entry key="/community/highlight/*/*/*.html"      value-ref="Community.Highlight.Profile.Controller"/>
150                                <entry key="/community/highlight/**"              value-ref="Community.Highlight.Selection.Controller"/>
151
152                                <entry key="/community/**"                        value-ref="Community.HTMLContent.Controller"/>
153
154
155                                <!-- P H O M   R E P O R T   P A G E S -->
156                                <entry key="/phom/expanded_view/*.html" value-ref="PHOM.ExpandedView.Controller"/>
157                                <entry key="/phom/view/*.html"          value-ref="PHOM.CondensedView.Controller"/>
158                                <entry key="/phom/**"                   value-ref="PHOM.HTMLContent.Controller"/>
159
160
161                                <!-- P U B L I S H -->
162                                <!-- default publishing URL mapping that even if direct publishing is
163                                        configured in the admin app does no harm as these URLs are never hit.
164                                -->
165                                <entry key="/publish/categorized_index.xml" value-ref="Publish.CategorizedIndex.Controller"/>
166                                <entry key="/publish/indicator/*.xml"       value-ref="Publish.Indicator.Controller"/>
167                                <entry key="/publish/org_units.xml"         value-ref="Publish.OrgUnits.Controller"/>
168
169
170                                <!-- U S E R   P R O F I L E -->
171                                <entry key="/user/Login.html"          value-ref="User.HTMLContent.Controller"/>
172<entry key="/user/AccountAccess.html"  value-ref="User.HTMLContent.Controller"/>
173<entry key="/send/user/password"       value-ref="User.EmailPassword.Controller"/>
174<entry key="/send/user/verification"   value-ref="User.EmailPassword.Controller"/>
175<entry key="/user/Registration.html"   value-ref="User.HTMLContent.Controller"/>
176<entry key="/save/user/registration"   value-ref="User.ProcessUserRegistration.Controller"/>
177<entry key="/verify/user/registration/**" value-ref="User.VerifyUserRegistration.Controller"/>
178<entry key="/edit/user/profile"        value-ref="User.EditProfile.Controller"/>
179<entry key="/save/user/profile"        value-ref="User.SaveProfile.Controller"/>
180
181<entry key="/user/selection/List.html" value-ref="User.QuerySelectionList.Controller"/>
182
183                                <!-- B L O C K E D   R E S O U R C E S -->
184                                <!-- External URL blocker mapping
185                                        Blocked direct file access URLs.  Files that need to be
186                                        blocked from public access can have a general mapping that
187                                        goes to a simple controller that returns a missing resource
188                                        page.  This could also be mapped to a general controller
189                                        that simply returns a 404 or 403 error.  There are other
190                                        ways to impelment like putting the files within a WEB-INF/*
191                                        subdirectory.  Can also be done via a filter (like the
192                                        CheckAllowedRequesterIPAddressFilter) etc.
193                                -->
194                                <entry key="/xml/users/**" value-ref="Common.BannedXMLAccess.Controller"/>
195
196
197                                <!-- O T H E R   -   G E N E R I C   T R A S F O R M A T I O N -->
198                                <entry key="/view" value-ref="View.Controller"/>
199
200
201                                <!-- W E L C O M E   /   I N D E X    H A N D L E R -->
202                                <!-- This mechanism along with the servlet and welcome-file-list
203                                        definitions in the web.xml and servlet spec 2.4 allow for
204                                        a servlet to directly handle an application root request
205                                        (what was a redirect within the index.html file).
206                                -->
207                                <entry key="/Welcome" value-ref="Home.HTMLContent.Controller"/>
208                                <entry key="/"        value-ref="Home.HTMLContent.Controller"/>
209
210                        </map>
211                </property>
212        </bean>
213
214
215        <!--  V I E W   R E S O L V E R  -->
216        <!--
217                For XSLTs, view resolver is NOT needed since the views are beans that
218                are passed into the controller.  For JSPs, it is needed to properly
219                locate the jsp.  View resolver messes with the graph request so DO NOT
220                implement unless graph views are handled differently.
221        <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
222                <property name="prefix" value="/WEB-INF/jsp/"/>
223                <property name="suffix" value=".jsp"/>
224        </bean>
225        -->
226        <bean id="RequestDispatcher.BeanName.ViewResolver" class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
227
228</beans>
229
Note: See TracBrowser for help on using the repository browser.