-
Notifications
You must be signed in to change notification settings - Fork 60
Gotchas
rapilabs edited this page Mar 8, 2013
·
9 revisions
- OpenMRS implements a whitelist policy for route names. Standard JSP pages must use a pre-defined extension. See the web.xml for the entire list (see the servlet-mapping tags).
- The Spring configuration files are: (as defined in web.xml)
- applicationContext-service.xml
- openmrs-servlet.xml
- Each module's:
- moduleApplicationContext.xml
- webModuleApplicationContext.xml
It took a couple of goes to get Spring to actually send an "Authorization" header out with RestTemplate requests. Part of the problem is that to do something as trivial as send a http request with basic authentication you need to wire up all these intermediary objects just to get it configured.
- My first attempt was pass in credentials via a BasicCredentialsProvider to the HttpClient - that didn't work
- My 2nd attempt was a convoluted solution described here which also didn't work.
- At this stage I saw that someone else had a similar issue which was apparently fixed by forcing the "Accept" header to "/" so I tried that but again didn't work
- My 3rd attempt was just to go back to basics and manually create the Authorization header - and yay! it worked!