We have a requirement where we need to add a custom header with dynamic value for .pdf requests we thought of below options:
1) Create a filter and intercept the request.
2) Rewrite the url to add custom selector in dispatcher, so that my custom servlet will be resolved.
Can you please suggest us if you have any other efficient solution to achieve this.