source: main/branches/2.1/src/main/webapps/ibisph-view/WEB-INF/config/spring/dispatcher_servlet.xml @ 3663

Last change on this file since 3663 was 3663, checked in by Garth Braithwaite, 11 years ago

java and view webapp - commit that has most of model map. committing before ripping out some code and cleaning up more model maps.

File size: 12.5 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<entry key="/query/definition/List.html"  value-ref="QueryDefinition.DefinitionList.Controller"/>
105
106                                <entry key="/run/query/definition/**"    value-ref="QueryDefinition.RunDefinition.Controller"/>
107                                <entry key="/edit/query/definition/**"   value-ref="QueryDefinition.EditDefinition.Controller"/>
108<entry key="/apply/query/definition/**"  value-ref="QueryDefinition.ApplyDefinition.Controller"/>
109<entry key="/delete/query/definition/**" value-ref="QueryDefinition.DeleteDefinition.Controller"/>
110<entry key="/save/query/definition"      value-ref="QueryDefinition.SaveDetail.Controller"/>
111
112<entry key="/save/query/result"          value-ref="QueryDefinition.EditDetail.Controller"/>
113
114
115<!-- run directly with name being specified as a get...
116<entry key="/query/definition/result/**/*.html" value-ref="QueryDefinition.DefinitionResult.Controller"/>
117<entry key="/query/definition/system/result/**/*.html" value-ref="QueryDefinition.SystemResult.Controller"/>
118-->
119
120                                <!-- S E C U R E  -->
121                                <entry key="/secure/selection/*.html"       value-ref="Secure.Selection.Controller"/>
122                                <entry key="/secure/query/selection/**"     value-ref="Secure.Query.Selection.Controller"/>
123                                <entry key="/secure/query/builder/**"       value-ref="Secure.Query.Builder.Controller"/>
124                                <entry key="/secure/query/submit/**"        value-ref="Secure.Query.Submit.Controller"/>
125                                <entry key="/secure/query/result/**/*.html" value-ref="Secure.Query.Result.Controller"/>
126                                <entry key="/secure/query/result/**/*.xls"  value-ref="Query.Result.Controller"/>       <!-- put here so can plug in Excel specifici controller in the future. -->
127                                <entry key="/secure/query/result/**/*.xml"  value-ref="Query.IBISQResult.Controller"/> 
128                                <entry key="/secure/query/configuration/**" value-ref="Query.Configuration.Controller"/>
129                                <entry key="/secure/query/selections"       value-ref="User.QuerySelectionList.Controller"/>
130
131                                <entry key="/secure"                        value-ref="Secure.Selection.Controller"/>
132
133
134                                <!-- C O M M U N I T Y -->
135                                <entry key="/community/snapshot/Builder.html" value-ref="Community.Snapshot.Builder.Controller"/>
136<!--
137                                <entry key="/community/snapshot/Report.html" value-ref="Community.Snapshot.Report.Controller"/>
138-->
139                                <!-- path: graphic/indicator view name/community name/community value.svg -->
140                                <entry key="/community/highlight/graphic/*/*/*.*" value-ref="Community.Highlight.ChartGraphic.Controller"/>
141
142                                <entry key="/community/highlight/index/*/*.html"  value-ref="Community.Highlight.Index.Controller"/>
143                                <entry key="/community/highlight/introduction/*/*.html" value-ref="Community.Highlight.Introduction.Controller"/>
144                                <entry key="/community/highlight/report/*/*.html" value-ref="Community.Highlight.Report.Controller"/>
145                                <entry key="/community/highlight/*/*/*.html"      value-ref="Community.Highlight.Profile.Controller"/>
146                                <entry key="/community/highlight/**"              value-ref="Community.Highlight.Selection.Controller"/>
147
148                                <entry key="/community/**"                        value-ref="Community.HTMLContent.Controller"/>
149
150
151                                <!-- P H O M   R E P O R T   P A G E S -->
152                                <entry key="/phom/expanded_view/*.html" value-ref="PHOM.ExpandedView.Controller"/>
153                                <entry key="/phom/view/*.html"          value-ref="PHOM.CondensedView.Controller"/>
154                                <entry key="/phom/**"                   value-ref="PHOM.HTMLContent.Controller"/>
155
156
157                                <!-- P U B L I S H -->
158                                <!-- default publishing URL mapping that even if direct publishing is
159                                        configured in the admin app does no harm as these URLs are never hit.
160                                -->
161                                <entry key="/publish/categorized_index.xml" value-ref="Publish.CategorizedIndex.Controller"/>
162                                <entry key="/publish/indicator/*.xml"       value-ref="Publish.Indicator.Controller"/>
163                                <entry key="/publish/org_units.xml"         value-ref="Publish.OrgUnits.Controller"/>
164
165
166                                <!-- U S E R   P R O F I L E -->
167                                <entry key="/user/Login.html"          value-ref="User.HTMLContent.Controller"/>
168<entry key="/user/AccountAccess.html"  value-ref="User.HTMLContent.Controller"/>
169<entry key="/send/user/password"       value-ref="User.EmailPassword.Controller"/>
170<entry key="/send/user/verification"   value-ref="User.EmailPassword.Controller"/>
171<entry key="/user/Registration.html"   value-ref="User.HTMLContent.Controller"/>
172<entry key="/save/user/registration"   value-ref="User.SaveRegistration.Controller"/>
173<entry key="/verify/user/registration" value-ref="User.VerifyRegistration.Controller"/>
174<entry key="/edit/user/profile"        value-ref="User.EditProfile.Controller"/>
175<entry key="/save/user/profile"        value-ref="User.SaveProfile.Controller"/>
176
177<entry key="/user/selection/List.html" value-ref="User.QuerySelectionList.Controller"/>
178
179
180                                <!-- B L O C K E D   R E S O U R C E S -->
181                                <!-- External URL blocker mapping
182                                        Blocked direct file access URLs.  Files that need to be
183                                        blocked from public access can have a general mapping that
184                                        goes to a simple controller that returns a missing resource
185                                        page.  This could also be mapped to a general controller
186                                        that simply returns a 404 or 403 error.  There are other
187                                        ways to impelment like putting the files within a WEB-INF/*
188                                        subdirectory.  Can also be done via a filter (like the
189                                        CheckAllowedRequesterIPAddressFilter) etc.
190                                -->
191                                <entry key="/xml/users/**" value-ref="Common.BannedXMLAccess.Controller"/>
192
193
194                                <!-- 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 -->
195                                <entry key="/view" value-ref="View.Controller"/>
196
197
198                                <!-- W E L C O M E   /   I N D E X    H A N D L E R -->
199                                <!-- This mechanism along with the servlet and welcome-file-list
200                                        definitions in the web.xml and servlet spec 2.4 allow for
201                                        a servlet to directly handle an application root request
202                                        (what was a redirect within the index.html file).
203                                -->
204                                <entry key="/Welcome" value-ref="Home.HTMLContent.Controller"/>
205                                <entry key="/"        value-ref="Home.HTMLContent.Controller"/>
206
207                        </map>
208                </property>
209        </bean>
210
211
212        <!--  V I E W   R E S O L V E R  -->
213        <!--
214                For XSLTs, view resolver is NOT needed since the views are beans that
215                are passed into the controller.  For JSPs, it is needed to properly
216                locate the jsp.  View resolver messes with the graph request so DO NOT
217                implement unless graph views are handled differently.
218        <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
219                <property name="prefix" value="/WEB-INF/jsp/"/>
220                <property name="suffix" value=".jsp"/>
221        </bean>
222        -->
223        <bean id="RequestDispatcher.BeanName.ViewResolver" class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
224
225</beans>
226
Note: See TracBrowser for help on using the repository browser.