Hello all,
I have opened a jira case, SLING-1432, about an issue I'm currently
having with forwarding in a filter. I currently use a filter to force
a deeper node structure and present the illusion of it being very flat
to work around serious performance problems in jackrabbit while hiding
that from my application's front end.
My filter itself is very simple. It looks at the request's pathinfo,
and if it matches a regex I forward the request to a deeper path.
This applies to both GET and POST. This seems to work fine for all
nodes that I use the provided output formatting servlets to retrieve,
like json, xml, txt, etc, but this doesn't work for static resources
that I just want stored, such as images, docs, etc. Trying to access
those resources leads to a 404 from sling, although I can verify that
I forward to the correct node.
Looking at the log output, it looks like the JcrResourceResolver runs
before executing any filters I provide, and does not run again after
being forwarded from my filter. I think that some state in the
SlingHttpServletRequest object isn't being cleaned up in the case of a
forward from a filter registered with Sling. I'm still not sure though.
Does anybody have any idea why this strategy doesn't work for simple
content but does for anything being loaded and serialized by sling
itself?
-Jason
- Forwarding in Filters to Static Resources (image, etc) Jason Rose
-