Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Options to dynamically configure WebFilter #70

Open
McFoggy opened this issue Dec 21, 2018 · 0 comments
Open

Options to dynamically configure WebFilter #70

McFoggy opened this issue Dec 21, 2018 · 0 comments

Comments

@McFoggy
Copy link

McFoggy commented Dec 21, 2018

In order to configure the WebFilter from a subclass there is a constructor allowing to pass properties which will take precedence over the FilterConfig properties ; this is fine when your are able to build at construction time the Properties object. Proxying or changing the FilterConfig is not possible since the init method is marked final.

It would be nice to allow for a more dynamic version ; probably exposing a protected Properties getProperties(FilterConfig config) method would be enough. This way one could override WebFilter and still be able to use for example CDI injected features in order to override the properties.
With the above proposal, subclasses can benefit from the FilterConfig & thus ServletContext to behave differently and to populate accordingly the Properties.

Does it make sense to add such a protected method or are there other ways to achieve such a dynamic behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant