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

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

java and view webapp - saved query with criteria list, saved query validation.

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