Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


The Problem

Servlet mappings are currently configured under /filters/servlets. Often times, other components in the system need to know about those mappings. A simple example: generating links for the DAM servlet.


Make it possible for arbitrary components to know how/where a servlet is mapped.

Use Cases

  • Generating DAM links
  • Generating links to Imaging module
  • Links to REST APIs
  • essentially anything exposed via a Servlet where we need to generate links to.

Such a mapping could be configured in the module's own class - and therefore used by the servlet mapping AND other arbitrary components (URI2RepoMapping, Link API, templating functions, ...)




A replacement/subclass for ServletDispatchingFilter and info.magnolia.cms.filters.Mapping. A developer would need to subclass the Filter class replacement and implement a getDynamicMapping() method. (Where this method would delegate to MyModule.getFooPath(), and MyModule would be @injected in said filter.


Screenshots should be speaking enough:

Current servet mapping:


1) Path (mapping) in the module:

2) Different configuration for the servlet node:


I have a POC working in my local DAM branch.

I would suggest having this (the abstract) in core.

I can update this concept with proposed naming.

Additionally, might make sense to change the package of these new classes (from info.magnolia.cms.filters to info.magnolia.servlets and/or info.magnolia.filters.servlets)


  • No labels