Author: kwin
Date: Fri Jan 8 09:27:38 2016
New Revision: 1723666
URL: http://svn.apache.org/viewvc?rev=1723666&view=rev
Log:
clarify the JSP scripting variables being defined by sling:defineObjects
Modified:
sling/site/trunk/content/documentation/bundles/sling-scripting-jsp-taglib.mdtext
Modified:
sling/site/trunk/content/documentation/bundles/sling-scripting-jsp-taglib.mdtext
URL:
http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/sling-scripting-jsp-taglib.mdtext?rev=1723666&r1=1723665&r2=1723666&view=diff
==============================================================================
---
sling/site/trunk/content/documentation/bundles/sling-scripting-jsp-taglib.mdtext
(original)
+++
sling/site/trunk/content/documentation/bundles/sling-scripting-jsp-taglib.mdtext
Fri Jan 8 09:27:38 2016
@@ -179,9 +179,20 @@ Execute a script.
### defineObjects
-Defines regularly used scripting variables
+Defines regularly used scripting variables. By default the following scripting
variables are defined through this tag:
-* Attributes
+* **slingRequest**, SlingHttpServletRequest object, providing access to the
HTTP request header information - extends the standard HttpServletRequest - and
provides access to Sling-specific things like resource, path info, selector,
etc.
+* **slingResponse**, SlingHttpServletResponse object, providing access for the
HTTP response that is created by the server. This is currently the same as the
HttpServletResponse from which it extends.
+* **resourceResolver**, Current ResourceResolver. Same as
slingRequest.getResourceResolver().
+* **sling**, SlingScriptHelper, containing convenience methods for scripts,
mainly sling.include('/some/other/resource') for including the responses of
other resources inside this response (eg. embedding header html snippets) and
sling.getService(foo.bar.Service.class) to retrieve OSGi services available in
Sling (Class notation depending on scripting language).
+* **resource**, current Resource to handle, depending on the URL of the
request. Same as slingRequest.getResource().
+* **log**, provides an SLF4J Logger for logging to the Sling log system from
within scripts, eg. log.info("Executing my script").
+* **currentNode**, the underlying JCR node (if there is one) of the current
resource.
+* **bindings**, provides access to the SlingBindings object for access to
non-standard scripting variables.
+See also [Scripting variables in
CMS](https://cwiki.apache.org/confluence/display/SLING/Scripting+variables#Scriptingvariables-JSP)
+
+
+* Attributes which allow to bind the according variables to other names than
the default ones listed above.
* requestName
* responseName
* resourceName