On Jan 21, 2008 9:39 AM, Felix Meschberger <[EMAIL PROTECTED]> wrote:
> ...The better way is to do:
>
> Session session =
> request.getResourceResolver().adaptTo(Session.class);...
If the Resource is a JCR node, it would be convenient to have direct
access to a "session" variable, or "JcrSession" to avoid confusion
with the HTTP Session.
Currently these scripting variables are set in SlingScriptServlet:
SlingBindings props = new SlingBindings();
props.put(REQUEST, req);
props.put(RESPONSE, res);
props.put(FLUSH, TRUE);
To avoid hardcoding additional values here, maybe this could ask the
current Resource for more variables to bind? A JcrResource could then
provide the JCR session, workspace, queryManager or whatever's
convenient, in a way that's localized to the JcrResource's
JCR-specific code.
WDYT?
-Bertrand