Sign in to Community
Sign in to view all badges
Expand my Community achievements bar.
I want to print clientLibrary to my file system.For example If I give categories="abc.xyz.js",then it should print the js files for that particular clientlibs.
I tried to implement using HtmlLibraryManager m = getService(slingRequest); , but it didn't work.No idea where I have made mistake.
Please find the piece of code below :
Writer out = new PrintWriter("E:\\abc.txt", "UTF-8");
HtmlLibraryManager m = getService(slingRequest);
m.writeJsInclude(slingRequest, out, st);
You can have a look at reference implementation aem-clientlib-async/ClientLibUseObject.java at master · nateyolles/aem-clientlib-async · GitHub