0

In my web application, pages are dynamically mapped to urls and pages can be added and removed. Hence, I wrote my own class extending AbstractUrlHttpHandlerMapping and all requests are routed to one handler method.

However, now I don't want resources to be treated the same way, resources should just be returned as usually. How do I achieve this? I tried returning a ResourceHttpRequestHandler for such resources, but I am not sure what to set PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE to. My attempts ended in an NPE.

Is there a better way to return resources while using my own handler mapping?

user2035039
  • 961
  • 3
  • 16
  • 30

1 Answers1

0

I realised this is probably a duplicate of this. The solution presented there works for this case as well.

Community
  • 1
  • 1
user2035039
  • 961
  • 3
  • 16
  • 30