aem

Cq5.5 applying a servlet filter to a specific path

和自甴很熟 提交于 2019-12-12 08:53:15
问题 I'm working on a custom form handler in cq5.5 and everything is going great. I'm now working on locking down some of the security and one of my tasks is to implement a request throttling filter to the form handlers path. Currently I have something like @Component(immediate = true, metatype = true) @Service(javax.servlet.Filter.class) @Properties({ @Property(name="service.pid", value="com.xxxxxx.cq.core.filter.FormFilter",propertyPrivate=false), @Property(name="service.description",value=

Is it possible to recursively flush directories in the CQ5/AEM apache dispatcher?

无人久伴 提交于 2019-12-12 08:43:30
问题 I have a dispatcher set up with a fairly deep stats file level due to a particular project in a multi tenancy situation. What I'm hoping is for a way to be able to recursively flush directories to mimic a more shallow stats file level for the other tenants. Is there a dispatcher flush command that allows me to explicitly delete a directory of content? 回答1: You could achieve this yourself by sending a simple GET request to your dispatcher. The path on the Dispatcher that you need to hit is

Getting OSGi services from a bundle in Sling/CQ

寵の児 提交于 2019-12-12 07:32:49
问题 I am using Day CQ. I want to store some data in a SQL Server DB, using the connection pool available in the Felix console. I can do this from a JSP, by using the "sling" object of type SlingScriptHelper defined in the defineObjects tag sling.getService(DataSourcePool.class). However, I want to use a servlet created in an OSGi bundle to handle requests from the client. The servlet doesn't have a defineObjects tag, so the "sling" object is not defined. I don't see a way to create a valid

How copy node tree in AEM?

时光总嘲笑我的痴心妄想 提交于 2019-12-12 07:01:28
问题 I need to get java code for copy node tree inside [content/dam/img.jpg and subnodes[jcr:content and metadata]] in to [etc/mynodes] Source path: conten/dam/img.jp Destin path: etc/mynodes i want copy nodes :img.jpg>jcr:content>metadata 回答1: You can use the JCR API to play with content nodes, here I have used an example with workspace.copy to move the /content/dam/geometrixx/portraits child nodes to /etc/mynodes/test workspace.copy("/content/dam/geometrixx/portraits", "/etc/mynodes/test");

How to Access Image Rendition in AEM

故事扮演 提交于 2019-12-12 06:30:26
问题 we have different renditions of image created in dam by Dam Workflow in our project. Now when we want to access an image in page how will we know which rendition to access dynamically depending on the device. Is it something which UI decides or is it something AEM decides. And how does it work with dispatcher. Any help is highly appreciated. Thanks, Tushar 回答1: You can build logic into your components so that they will fetch the correct image, so the UI decides which image rendition to fetch.

Create a hello world bundle in eclipse and check the working jar file on CRX

人盡茶涼 提交于 2019-12-12 04:56:10
问题 I am learning Adobe CQ5 on my own. I had pulled the folder structure of jcr_root to my eclipse workbench using vaultclipse. Now my request is can someone provide me some references wherein I can write a hello world bundle in eclipse, bundle it and then push the jar file onto CRX.? To be simple, Steps to achieve a working bundle on CRX which we have created on eclipse environment. What ever I have been through the reference links of Adobe CQ5 blogs, I see most of them are on CRXDE environment

Adobe CQ - fetch HTML content from .jsp node

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 04:19:36
问题 Have .jsp file under /components path looks like: http://localhost:4502/apps/project-name/components/my-component/one.jsp Is it possible get HTML content of this one.jsp by url without creating content node? something like: http://localhost:4502/apps/project-name/components/my-component/one.HTML the .html content is needed for further rendering. 回答1: As far as i know, you cannot get the html content from the JSP directly by providing the path to the jsp file. It displays the content in the

How to programatically delete revisions of a page in CQ5?

南楼画角 提交于 2019-12-12 04:06:22
问题 In the current setup; we are trying to automate the process of creating the blueprint page, rolling it out to its live copies; and activating the live copy pages.Also; deactivation and deletion of pages is also done programmatically . All this is done via code using the com.day.cq.wcm.api.msm and com.day.cq.replication api. The problem we are facing right now is after deleting the blueprint and live copy pages programmatically ; if we again create the same page programmatically ; then; there

Sharing content between Adobe CQ5 pages

天大地大妈咪最大 提交于 2019-12-12 03:53:16
问题 I'm currently creating a CMS for a site in Adobe CQ5. One of the components that has been asked for is to have a custom navigation component for menus. The user would be able to enter a series of links and urls specific to that page. The kicker is that they need to be able to share this menu with several other pages (but not all, generally this will be the other pages in the same folder). There will also be several different menus each shared between their own group of pages. So I guess the