aem

How to get currentPagePath in Slingservlet?

被刻印的时光 ゝ 提交于 2019-12-11 02:27:01
问题 From some javascript I call the following Slingservlet with ("/bin/fooServlet?"+params); @SlingServlet(paths = "/bin/fooServlet", methods = "GET", metatype = true) public class FooServlet extends SlingAllMethodsServlet { .. protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) { Session session = resourceResolver.adaptTo(Session.class); Page currentPage = pageManager.getPage(request.getPathInfo()); String currentPagePath = currentPage.getPath(); ... } My

add a new property to a node(page) using ECMA script

余生颓废 提交于 2019-12-11 02:10:23
问题 I need to add a property to a page on page activation. I have decided to set up a workflow process that does the same before an activation step. My custom workflow step (the one before the activation step) makes use of an ECMA script to achieve this. Here's what I have so far. var workflowData = graniteWorkItem.getWorkflowData(); if (workflowData.getPayloadType() == "JCR_PATH") { var path = workflowData.getPayload().toString(); var jcrsession = graniteWorkflowSession.adaptTo(Packages.javax

Installing large packages in aem

南楼画角 提交于 2019-12-11 00:51:56
问题 I need to install large-sized packages in a new instance I am configuring. I am using package-manager for this but it is taking very long time for installation. Is there some other way this can be done? Additionally, it would be helpful if I can get information about physical location where DAM packages are stored. (Example: is there some way I can find path of DAM packages on my localhost?) Thanks in advance! 回答1: To install large content packages we always use curl . The largest packages we

How do I resolve org.apache.http.ssl with AEM?

旧城冷巷雨未停 提交于 2019-12-11 00:16:06
问题 Ultimately, I'm trying to use AWS S3 libraries in Java code to enable server-side S3 uploads with AEM, but I'm running into problems just getting the dependencies installed and/or recognized by AEM. Every time I add a new dependency, five more issues pop up. In this bundle I'm attempting to build, This is the error I'm seeing: The instructions in my pom.xml are this: <instructions> <Embed-Transitive>true</Embed-Transitive> <Export-Package> com.amazonaws.HttpMethod, com.amazonaws.services.s3.*

JCR-SQL - contains function doesn't escape special characters?

ⅰ亾dé卋堺 提交于 2019-12-10 22:52:11
问题 I have the following query string: SELECT jcr:title, jcr:created, jcr:description FROM cq:PageContent WHERE jcr:path LIKE '/content/.../%' AND CONTAINS (., '*') ORDER BY date ASC The problem is that the query is returning all nodes from the given path even though they don't have asterisk in any proeprty. I wanted to escape the asterisk character, but the result is the same. I've tried something like this: SELECT jcr:title, jcr:created, jcr:description FROM cq:PageContent WHERE jcr:path LIKE '

AuthenticationSupport service missing after installing S3 connector

守給你的承諾、 提交于 2019-12-10 22:27:54
问题 I installed S3 Connector for AEM (COM.ADOBE.GRANITE.OAK.S3CONNECTOR) through the package share, and now my AEM instance is bricked. Whenever I go to localhost:4502, I get a page saying: HTTP ERROR: 503 Problem accessing /. Reason: AuthenticationSupport service missing. Cannot authenticate request. In the error logs, I see this stack trace: 06.04.2017 14:03:24.889 *ERROR* [FelixFrameworkWiring] org.apache.jackrabbit.oak-core [org.apache.jackrabbit.oak.plugins.blob.datastore.SharedS3DataStore

How single partition batch in Cassandra function for multiple column update?

时光总嘲笑我的痴心妄想 提交于 2019-12-10 15:41:42
问题 We have multiple update queries in a single partition of a single columnfamily. Like below update t1 set username = 'abc', url = 'www.something.com', age = ? where userid = 100; update t1 set username = 'abc', url = 'www.something.com', weight = ? where userid = 100; update t1 set username = 'abc', url = 'www.something.com', height = ? where userid = 100; username , url will be always same and are mandatory fields. But depending on the information given there will be extra columns. As this is

Adobe CQ5.5-How to display Page Thumbnail using API

為{幸葍}努か 提交于 2019-12-10 11:37:59
问题 I have configured image for my page using sidekick >Page properties>Images tab. Now I want to fetch my this page image(thumbnail) in one of my jsp. Can someone give me pointers or code snippet for api class and method that I can use to achieve this. Thanks, Rajeev 回答1: I would suggest using the default image component as an example - /libs/foundation/components/image. If you're putting your code into a component for your specific page type though, your code should be something like this: if

In Adobe AEM, how does the parsys component inject styles into the design css file?

落爺英雄遲暮 提交于 2019-12-09 16:01:17
问题 In Adobe AEM ( formerly CQ5 ) the foundation component parsys' design_dialog allows the user to set the "Cell Padding". Whatever value is entered into the text field will show up in the design css. For example: Given that the current page is using /etc/designs/my-design the page output will include reference to the /etc/designs/my-design.css stylesheet virtual path. If the user configured the parsys cell padding to be 30px then the my-design.css file will include the following: .page_full

CQ5: 403 Forbidden occurs when call a Post servlet

一个人想着一个人 提交于 2019-12-09 13:11:20
问题 Hi I'm using this code to create a Post method for my CQ5 example application. package com.adobe.cq.sling; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.HttpURLConnection; import java.net.URL; import java.rmi.ServerException; import java.util.Dictionary; import org.apache.felix.scr.annotations.Properties; import org.apache.felix.scr.annotations.Property; import org.apache