Hi all,

The SlingRequestDispatcher implements the Servlet API RequestDispatcher
interface and is created upon any client calling any of the
SlingHttpServletRequest.getRequestDispatcher methods. The
SlingRequestDispatcher is also the base for the <sling:include> JSP tag
and the SlingScriptHelper.include implementation.

The ServletAPI defines the following request attributes to be set
whenever a resource/servlet is included by RequestDispatcher.include():

    javax.servlet.include.request_uri
    javax.servlet.include.context_path
    javax.servlet.include.servlet_path
    javax.servlet.include.path_info
    javax.servlet.include.query_string

These request attributes are not currently set by the
SlingRequestDispatcher implementation.

On the other hand, we set the following request attributes when
including resources:

    org.apache.sling.api.include.servlet
    org.apache.sling.api.include.resource

Now I wonder, whether we should:

  (1) set the javax.servlet.include.* attributes upon include ?
      --> Probably yes for standards compliance

  (2) define a new property
         org.apache.sling.api.include.path_info
      taking the SLingHttpServletRequest.getRequestPathInfo()

WDYT ?

BTW, in contrast to the javax.servlet.include.* request attributes which
are only set up calling the RequestDispatcher.include method, the
org.apache.sling.api.include.* request attributes are set when calling
the RequestDispatcher.include and RequestDispatcher.forward method.


Regards
Felix

Reply via email to