use of org.apache.sling.api.scripting.SlingScriptHelper in project sling by apache.
the class GetPropertyTag method getClassLoader.
/**
* Method for retrieving the classloader from the OSGi console.
*
* @return the classloader
*/
protected ClassLoader getClassLoader() {
final SlingBindings bindings = (SlingBindings) pageContext.getRequest().getAttribute(SlingBindings.class.getName());
final SlingScriptHelper scriptHelper = bindings.getSling();
final DynamicClassLoaderManager dynamicClassLoaderManager = scriptHelper.getService(DynamicClassLoaderManager.class);
final ClassLoader classLoader = dynamicClassLoaderManager.getDynamicClassLoader();
return classLoader;
}
Aggregations