Hi Community,
I'm working on an AEM project where I’ve implemented a path-based servlet that handles four different extensions (e.g., .json, .xml, .txt, .custom). The servlet is registered using @SlingServletResourceTypes with specific extensions.
The issue I'm facing is that one of the extensions is not resolving correctly only in one specific environment (e.g., staging). For the problematic extension (say .custom), the URL resolution fails — the extension gets appended to the path instead of being resolved properly, and it ends up getting routed to some default Apache servlet instead of my custom path-based servlet.
Here are some additional details:
The same code and configuration work perfectly fine in all other environments, including local and dev.
The other three extensions are working as expected in all environments.
The servlet path and resourceType are properly configured and unchanged across environments.
No custom Apache rewrite or dispatcher rules seem to be affecting this.
Has anyone faced a similar issue or can help me debug what might be going wrong with this specific extension resolution in that environment?
Any insights would be highly appreciated.
Thanks,
Gnaneswar