aem

Get JSP output within Servlet in AEM

 ̄綄美尐妖づ 提交于 2020-01-01 17:02:52
问题 In CQ, we need to process jsp within servlet then combine the result with other results we get from server before writing back to browser. The following code is almost what we need, except that it writes the result back to browser after processing jsp. RequestDispatcher dispatcher = request.getRequestDispatcher(resource); dispatcher.forward(request, response); We tried using mock response as follows: RequestData requestData = new RequestData(slingRequestProcessor, request, mockResponse);

Get JSP output within Servlet in AEM

て烟熏妆下的殇ゞ 提交于 2020-01-01 17:02:11
问题 In CQ, we need to process jsp within servlet then combine the result with other results we get from server before writing back to browser. The following code is almost what we need, except that it writes the result back to browser after processing jsp. RequestDispatcher dispatcher = request.getRequestDispatcher(resource); dispatcher.forward(request, response); We tried using mock response as follows: RequestData requestData = new RequestData(slingRequestProcessor, request, mockResponse);

How to deploy rep:policy files via maven?

与世无争的帅哥 提交于 2020-01-01 05:10:50
问题 I've added some extra ACLs to /home/groups and /home/users by adding _rep_policy.xml files for each, but can't seem to get them to deploy. I added the following lines to my vault filter.xml <filter root="/home/users/rep:policy" mode="replace"/> <filter root="/home/groups/rep:policy" mode="replace"/> Both have contents like this: <?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" jcr:primaryType="rep:ACL"> <allow jcr:primaryType="rep

Adding “defer” attribute to clientLib script tags in AEM 6.1

五迷三道 提交于 2019-12-31 05:50:48
问题 How would I add the defer attribute to our script tags? We get them via the clientLib tag call in our head.html but there's not much out there for AEM and how to easily add the defer tag to our scripts. <clientlib data-sly-call="${clientLib.all @ categories=['company-libraries']}" data-sly-unwrap/> Any help is appreciated! Thanks 回答1: You could use Jens answer: https://github.com/nateyolles/aem-clientlib-async but that one does not play nice with ACS commons versioned clientlib.which is why I

How can I prevent exposing of content hiererchy paths within AEM? I am looking for alternatives both at AEM level as well as Dispatcher level

北城以北 提交于 2019-12-31 05:20:36
问题 As an example, how would you achieve: a. Translate a hit to www.mysite.com to www.mysite.com/en and b. Translate the above www.mysite.com/en to /content/mysite/en.html 回答1: Take a look at resource mapping: https://docs.adobe.com/docs/en/aem/6-2/deploy/configuring/resource-mapping.html https://docs.adobe.com/docs/en/dispatcher/disp-domains.html#URL%20Mapping With mapping you can make it so the incoming URL (what the user sees in their browser) is one thing, but the URL that AEM sees when

Version of Ext JS used by AEM 6.1

折月煮酒 提交于 2019-12-31 03:02:11
问题 Which version of Ext JS library does AEM 6.1 use? Is there a direct way/console to find this out? 回答1: It uses v3.4.0 of ExtJS on top of which the AEM Widget Library is built. You can find the details at /libs/cq/ui/widgets/source/ext/release-notes.html The following Note is also available at https://docs.adobe.com/docs/en/aem/6-1/develop/components/widgets.html Adobe Experience Manager is built upon ExtJS 3.4.0. 来源: https://stackoverflow.com/questions/35553557/version-of-ext-js-used-by-aem-6

How to Set UTF-8 response on doPost() call?

你。 提交于 2019-12-25 08:34:40
问题 I Am trying to have a JSON response back to the page with UTF-8 data, as it is what i have posted from the Form to my osgi servlet. The Servlet code is as shown below: import org.json.simple.JSONArray; import org.json.simple.JSONObject; @SlingServlet(paths="/bin/JsonOsgiCall", methods = "POST", metatype=true) public class JsonOsgiCall extends org.apache.sling.api.servlets.SlingAllMethodsServlet { private static final long serialVersionUID = 2598426539166788515L; protected final Logger log =

how to run external js plugin function in AEM

被刻印的时光 ゝ 提交于 2019-12-25 07:25:44
问题 how to run a java script function which belongs to an external plugin after the DOM gets loaded in adobe Experience Manager ? currently it run in console but not on local file. 回答1: Please have a look at this Adobe Helpx Articles:- https://helpx.adobe.com/experience-manager/using/custom-carousel-components.html //Creating Custom Carousel components for Adobe Experience Manager It covers, how to use third party Javascript/JQuery plugins in AEM components. [From Article] Add the JQuery Carousel

Extending CQ5 List component

泄露秘密 提交于 2019-12-25 05:24:19
问题 I'm looking into extending the cq5 list component to create custom list displays (obviously). The constructor takes a SlingHttpServletRequest and the minimal java doc says "creates a list from the specified request". Can someone explain how those request settings are used to build the list? what things in the request should I change to alter the list? Is there better documentation somewhere? 回答1: The component uses the request to retrieve the resource object. In the init method it retrieves a

Adobe CQ Image Coponent fileName

最后都变了- 提交于 2019-12-25 04:48:33
问题 I created a new Adobe CQ 5.6.1 Project using the Maven archetype, then created a page component, and a cq:Page that uses that page component as the sling:resourceType . The page component has a <cq:include path="par" resourceType="foundation/components/parsys" /> and the design for that par has the attribute components="[/libs/foundation/components/image,/libs/foundation/components/download]" Everything is fine, I can load the page, in the sidekick I see the Image and Download components and