この会話は、活動がないためロックされています。新しい投稿を作成してください。
この会話は、活動がないためロックされています。新しい投稿を作成してください。
Hi,
I am unable to get SlingScriptHelper in servlet using the below code..
bundleContext = FrameworkUtil.getBundle(SlingScriptHelper.class).getBundleContext();
factoryRef = bundleContext.getServiceReference(SlingScriptHelper.class.getName());
sling= (SlingScriptHelper) bundleContext.getService(factoryRef);
and
SlingBindings bindings = (SlingBindings) req.getAttribute(SlingBindings.class.getName());
SlingScriptHelper scriptHelper = bindings.getSling();
I am getting null.
java.lang.NullPointerException: Specified service reference cannot be null.
Please help me..
Thanks & Regards,
Veeru
解決済! 解決策の投稿を見る。
表示
返信
いいね!の合計
You can invoke a Sling Servlet from within AEM. See:
http://scottsdigitalcommunity.blogspot.com/2015/02/invoking-aem-sling-servlets-using.html
表示
返信
いいね!の合計
What you trying to do - are you trying to get a reference to the Sling Servlet from Java code?
表示
返信
いいね!の合計
You can invoke a Sling Servlet from within AEM. See:
http://scottsdigitalcommunity.blogspot.com/2015/02/invoking-aem-sling-servlets-using.html
表示
返信
いいね!の合計
Just use indeed @Reference in your servlet...
表示
返信
いいね!の合計