Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
org.apache.sling.engine from revision 685501
Description
As discussed on the mailing list (see http://markmail.org/message/fphyjdeb2oecjqdn), there is an issue when using the RequestDispatcher to include other components when the including component is addressed with a selector and the included component is not.
Using the following code doesn't work as expected, the original (selector-dispatched) servlet is still invoked for the included resource:
RequestDispatcherOptions options = new RequestDispatcherOptions();
options.setReplaceSelectors("");
RequestDispatcher dispatcher =
request.getRequestDispatcher(path, options);
Could it be that an empty replacement string is treated as non-existent?
Strangely enough the following code works, even though when addressing the resource directly in my browser, I get the same result with or without the ".html" suffix:
RequestDispatcher dispatcher =
request.getRequestDispatcher(path + ".html");