Hi,
On Wed, Aug 27, 2008 at 2:37 PM, Jukka Zitting <[EMAIL PROTECTED]> wrote:
> What am I doing wrong?
I chatted with Felix and was able to resolve the issue. I'm using a
selector to dispatch requests to my servlet component, and that
selector is carried down in the request where it causes the
RequestDispatcher to select my servlet again for processing the target
resource.
The preferred solution for fixing this would have been:
RequestDispatcherOptions options = new RequestDispatcherOptions();
options.setReplaceSelectors("");
RequestDispatcher dispatcher =
request.getRequestDispatcher(path, options);
... but for some reason that didn't work (perhaps because the replace
string is empty?). See SLING-633 for the related bug report.
The somewhat surprising workaround I came up with for now is to add an
extra suffix:
RequestDispatcher dispatcher =
request.getRequestDispatcher(path + ".html");
The funny thing is that in my browser I get the same output regardless
of whether I address the target resource with or without the ".html"
suffix. But for some reason adding it to the getRequestDispatcher()
call affects the end result.
BR,
Jukka Zitting