[ https://issues.apache.org/jira/browse/SLING-982?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Seifert updated SLING-982: --------------------------------- Attachment: 090521_SLING-982_includesupport.patch > Include Parameters for sling:include/SlingRequestDispatcher > ----------------------------------------------------------- > > Key: SLING-982 > URL: https://issues.apache.org/jira/browse/SLING-982 > Project: Sling > Issue Type: New Feature > Components: API, Engine, Scripting JSP > Reporter: Stefan Seifert > Attachments: 090521_SLING-982_includesupport.patch > > > attached is a patch proposal that adds support for include parameters when > using <sling:include> tag or SlingRequestDispatcher. > it supports two ways of pathing url paramters to included requests: > 1) adding url parameters in "path" attribute > example: > <sling:include path="./child1?param1=abc¶m2=def" /> > 2) adding url paramters via a new <sling:param> tag > example: > <sling:include path="./child1"> > <sling:param name="param1" value="abc"/> > <sling:param name="param2" value="def"/> > </sling:include> > both ways can be mixed. the semantics of the <sling:param> tag is the same as > the <jsp:param> tag: if a parameter with the same name exists already in the > surrounding requests, a new value is added, but the new value has a higher > precedence. e.g. if the request has a parameter A=foo and a parameter A=bar > is specified for include, the included request shall have A=bar,foo. > internal remarks: > * for this enhancements two methods have to be extended in sling api: a new > querystring attribut in RequestDispatcherOptions and a > "setIncludeRequestParameterMap" in SlingHttpServletRequest. i'm not > completely happy with the need for the latter one, but we need a way to pass > through the include paramteres to an existing request. > * i've checked if it is possible to reuse jsp:param instead of creating a new > sling:param tag. i think this is not possible, and not intended (excerpt from > jsp spec concerning jsp:param: "This element is used in the jsp:include, > jsp:forward, and jsp:params elements. A translation error shall occur if the > element is used elsewhere.") > * the internal encoding for include parameters is hard-coded to UTF-8. i hope > this is ok, because all include parameter handling happens only inside a > sling request. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.