Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-633

RequestDispatcherOptions.setReplaceSelectors("") doesn't work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • Engine 2.1.0
    • Engine
    • 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");

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            jukkaz Jukka Zitting
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: