[MAGNOLIA-926] Replace servlets by filters Created: 11/Jun/06  Updated: 17/Mar/09  Resolved: 15/Nov/06

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.0 Beta 1
Fix Version/s: 3.0 Final

Type: Improvement Priority: Critical
Reporter: Fabrizio Giustina Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLDMS-75 DMS : remove download servlet Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

We should explore some possible enhancements:

  • see if it's possible to move the logic that is handled by EntryServlet to a filter. This could allow an easier configuration (see MagnoliaManagedFilter) and allow a direct access to some resources (i.e. remove stream servlet for resorces in the webapp dir, allowing the execution of jsp files)
  • configure servlets in the config repository: harder to implement, but it could be a great feature: having a single filter (like we have now) that could dispatch requests to servlet not mapped in web.xml but loaded by magnolia itself. This could lead to the removal of any need for web.xml modification and make magnolia webapps easier to configure (a single filter and that's all)


 Comments   
Comment by Philipp Bracher [ 12/Jun/06 ]

To make the EntryServlet a filter and threfore chainable would be very powerfull. We should definitely follow this idea. Doing this we should also refactor the entry servlet so that it handles multiple repository requests:

  • one would like to have two website and a dms repository or similar
  • urls would be something like: /dms/* or web2/*

for dms it is tempararely solved by an own servlet. We should avoid this in the future.

Comment by Fabrizio Giustina [ 09/Jul/06 ]

I already moved most of the operations to filters, the code looks a lot easier to maintain than manually chaining operations in a single servlet:

  • RequestInterceptor is now a filter (the easiest one, that kind of operations perfectly fits into a filter)
  • Virtual Uri handling is now in a filter (nice!)
  • EntryServlet is now a filter (CmsFilter) too! We should just check that we are not filtering requests to other servlet, but at the moment looks like it works

CacheFilter doesn't work at the moment since it needs to be configured in the filter chain just before the CmsFilter. Will be easy to do as soon as the filter list (at the moment in a costant into MagnoliaManagedFilter) will be moved to the config jcr.

Absolutely needs some tests before a rc3, but it could be a great improvement... and we should go on removing all the servlets in web.xml (ActivatorHandler could be removed and managed like InterceptFilter does, and Import/Export should be moved to a page).

Comment by Boris Kraft [ 12/Oct/06 ]

Is this completed?

Comment by Magnolia International [ 15/Nov/06 ]

All this was done some time ago (started before rc1 and finished before rc4)

Generated at Mon Feb 12 03:21:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.