diff --git a/slice-core-api/src/main/java/com/cognifide/slice/api/tag/SliceTagUtils.java b/slice-core-api/src/main/java/com/cognifide/slice/api/tag/SliceTagUtils.java index e7804829..54ea9cd6 100644 --- a/slice-core-api/src/main/java/com/cognifide/slice/api/tag/SliceTagUtils.java +++ b/slice-core-api/src/main/java/com/cognifide/slice/api/tag/SliceTagUtils.java @@ -83,9 +83,7 @@ public static T getFromCurrentPath(final PageContext pageContext, final Clas * @throws ClassNotFoundException if the class was not found */ public static Class getClassFromType(final PageContext pageContext, final String type) throws ClassNotFoundException { - final SlingBindings bindings = (SlingBindings) pageContext.getRequest().getAttribute( - SlingBindings.class.getName()); - final SlingScriptHelper scriptHelper = bindings.getSling(); + final SlingScriptHelper scriptHelper = getSlingScriptHelper(pageContext); final DynamicClassLoaderManager dynamicClassLoaderManager = scriptHelper .getService(DynamicClassLoaderManager.class); final ClassLoader classLoader = dynamicClassLoaderManager.getDynamicClassLoader();