Ambra Journal URI Mapping
When a request comes to Ambra web application two filters take care of mapping journal specified in URL to corresponding Freemarker templates, css, javascript and other resources:
- VirtualJournalContextFilter loops through the list of journals, looks in configuration for ambra.virtualjournal.journal_name.rules and then parses request header for the string specified in the rule. If it matches, it's going to create new VirtualJournalContext and attach it to the request object.
- VirtualJournalMappingFilter gets request URI and replaces HttpServletRequest with new HttpServletRequestWrapper that returns modified paths based on VirtualJournalContext that has been attached to request in previous filter. For example /ambra-webapp/css/forms.css becomes /ambra-webapp/struts/journals/plosone/css/forms.css
Sequence Diagram
Attachments
- WebRequestSD.png (19.4 kB) -
Web Request SD
, added by dragisak on 10/02/08 09:54:23. - WebRequestSD.dia (2.4 kB) -
Web Request SD (dia)
, added by dragisak on 10/02/08 09:55:14.

