tag:blogger.com,1999:blog-74813712945190007302024-03-17T00:22:48.351+05:30AEM Developer Learning Adobe Experience Manager knowledge sharing point for AEM techies.Saurabh Guptahttp://www.blogger.com/profile/14737677039082756553noreply@blogger.comBlogger76125tag:blogger.com,1999:blog-7481371294519000730.post-72465499322884950672021-01-31T09:30:00.000+05:302021-01-31T09:30:01.809+05:30CRX Cleaner and IntelliVault Plugins for AEM<p> <span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">I have always been fond of plugins and tools which makes my life easier. In this blog, I will talk about two of my favorite plugins in IntellijIdea which makes my AEM development easier: </span><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">CRX Cleaner and IntelliVault.</span></p><span id="docs-internal-guid-b1eb357b-7fff-bc04-5a1f-9b0fdb08b6b0"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">.</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><a href="https://plugins.jetbrains.com/plugin/15576-crx-cleaner" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;">CRX Cleaner</span></a><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">: Recently a new plugin has been added in my development life which is CRX Cleaner. This is an IntellijIdea Plugin and absolutely free.</span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Use Case</span><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">: In AEM, while syncing the content, the syncing of workflows, templates, policies or sometimes pages also need to be done from AEM to the codebase repository.</span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">While syncing via packages/ plugin, it pulls all the unwanted properties like jcr:modifiedBy, jcr:modifiedDate, jcr:createdBy etc in the code base and makes git pushes really messy. Before this plugin, either I just avoided these properties and pushed the code having these properties or I used to clean up by myself one by one which was a super tedious task.</span></p><br /><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">I installed this plugin in intellijidea, and now just one short key </span><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Ctrl+ALT+L</span><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"> does the magic for me. You just select the whole file and hit the short key. Super easy and handy.</span></span><div><span id="docs-internal-guid-54a3e400-7fff-e4b1-fb83-a4444cc29809"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">How to install: Go to File-> Plugins-> search for CRX Cleaner-> Install</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="border: none; display: inline-block; height: 303px; overflow: hidden; width: 624px;"><img height="303" src="https://lh3.googleusercontent.com/63kUZFmIpdlSyYDcXNORlDm7zEHkU4UrsWn6DQ_RquVNbiOMDGEHoBKsd4eXfi_LqdkAarJkz7idvsrr7v5Oa2fnXa9ZXaQHP9MDoEIIyXC9w6PhNaOyS7bbY9Nm80S_wy5I_G7o" style="margin-left: 0px; margin-top: 0px;" width="624" /></span></span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><a href="https://plugins.jetbrains.com/plugin/7328-intellivault" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;">IntelliVault</span></a><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">: </span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">I believe most of the people working in AEM are aware about this plugin, but for those that aren’t I highly recommend it.</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Use Case: </span><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">This plugin helps to sync the content from AEM to code repository or from repository to AEM.</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Many times you just keep on changing the crx at so many places. So while moving the changes to the code repo, either make the package of all changes from CRX or sync the content with the help of this plugin.</span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">To make this tool work, vault-cli dependency is needed. vault-cli zip initially used to come with the AEM Jar and it was easy to configure it, but it was removed (/crx-quickstart/opt/fileVault) in the later versions of AEM. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">So I need to find the vault-cli.zip and do the configuration. As there are many versions of vault-cli and I noticed for some versions, the syncing doesn’t work sometimes, This additional task always makes me lazy and I end up making packages to sync my code instead of making this tool work.</span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">So If you are lazy like me, just click the link </span><a href="https://repo1.maven.org/maven2/org/apache/jackrabbit/vault/vault-cli/3.4.6/vault-cli-3.4.6-bin.zip" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;">https://repo1.maven.org/maven2/org/apache/jackrabbit/vault/vault-cli/3.4.6/vault-cli-3.4.6-bin.zip</span></a><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"> to download the vault zip and extract it to some place. This vault version works for me perfectly.</span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Now install the fileVault Plugin in IntellijIdea and after you install this, the plugin will start appearing in the </span><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Tools </span><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">section. Click on FileVault and configure the Vault directory path pointing to the </span><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">bin </span><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">folder following the path where you extracted your zip, i.e., “</span><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">ROOT_DIRECTORY\vault-cli-3.4.6-bin\vault-cli-3.4.6\bin”</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="border: none; display: inline-block; height: 388px; overflow: hidden; width: 624px;"><img height="388" src="https://lh4.googleusercontent.com/jOBLti7ZiWmEO-biLh5HoqmGY_uZm0TGy3zh3AjejPSUk33z6QWiJ-ooXzVEIA6bIKTdLUYeU1JQ17pAJRj79zz7SNbu5nfHBJzUvxqTUgI1MVqrHFnFSqCR9l1ObZGcO-dbjl5b" style="margin-left: 0px; margin-top: 0px;" width="624" /></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">When done with the configuration, you can start pushing and pulling the content.</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="border: none; display: inline-block; height: 428px; overflow: hidden; width: 565px;"><img height="428" src="https://lh4.googleusercontent.com/E7YqMEmN3ejA37XA_Zw-BqARirUAZEckVVqvPOW6H74NGkPXTbwL21Z2NsMbI1mA60ttPGD8mON8qHJfbbYeKqstO0_uRTRsnmKUIaWJ5Rxh96dDdX5BwZqBaR2ghVv9kFfl1lYP" style="margin-left: 0px; margin-top: 0px;" width="565" /></span></span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Hope you find it a good read.</span></p><div><span style="font-family: Arial; font-size: 13pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div></span></div>Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com5tag:blogger.com,1999:blog-7481371294519000730.post-60388439237566114252020-10-25T09:31:00.041+05:302020-10-27T07:57:45.263+05:30Register Sling Servlet or Any Service Dynamically in AEM<p> <span style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;">Hello Everyone,</span></p><span id="docs-internal-guid-b8d190b9-7fff-4a2d-32f1-b79fb8e3da37"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">While working on a project last week, I went through a very interesting use case and so many learnings </span><span style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;">while solving that. This blog is shared with you about that learning process I have </span><span style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;">been through.</span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Problem Statement</span><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">: I was working on an integration tool with AEM, in which we are having many servlets registered with paths . Few of the servlets are being called by a third party and few are for internal calls.</span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">All the servlets start with a specific prefix. Let’s suppose: /bin/aem-integration/events, /bin/aem-integration/tasks etc. So the prefix for all the servlets is "<b>/bin/aem-integration"</b> and it was as a constant in the code.</span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">But while using that tool, a client requested to provide them the flexibility to define the prefix as per their requirement. </span><span style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;">So that, while they made calls from any external system to AEM, they could make their own choice of prefix or may be a very environment specific prefix like for dev it will be /bin/aem-integration/dev/tasks but for stage it will be /bin/aem-integration/stage/tasks. The requirement looks easier but while implementing, it was quite challenging.</span></p><div><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div><div><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">How I approach this problem</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">:</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">So if I mention the above problem precisely, it is registering the servlets based on dynamic paths.</span></p><br /></span></div><div><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-c925bcb9-7fff-6522-9357-9dab2481f6f5"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">How can we do that? </span></p><div><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-41e26326-7fff-7cc4-8a3b-d13bee454a90"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">Let’s suppose I have a servlet "<b>RunModeServlet</b>" using SlingSettings as a Reference and I want to register this servlet dynamically. So how to do that.</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><br /></p><div><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><br /></span></div></span></span></div></span></span></div></span><script src="https://gist.github.com/sgaem/309041169af2bb385cec0d6b3d37a129.js"></script><span id="docs-internal-guid-975a460d-7fff-6185-1f8e-c899abf758fc"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">1.First I create a service "<b>ServletRegistration" </b>having an OSGI Configuration asking for Endpoint Prefix Configuration, b</span><span style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;">ecause every service is a component, so on the activate method of the component we need to register all the servlets dynamically and unregister and re-register with new values, if the author makes any change in configuration.</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><br /></p><span id="docs-internal-guid-ebd9a6f4-7fff-68fd-e5f6-0bb95cd4f060"><div><br /></div></span><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><script src="https://gist.github.com/sgaem/73a8371bf08ebf0ffb8ad9cb9f44fa78.js"></script><span style="color: black; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre;">Now if you are creating reference of a component via </span><span style="color: black; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><b>new <span style="font-size: 14.6667px;">RunModeServlet</span>() </b></span><span style="font-family: Arial; font-size: 11pt; white-space: pre;">and if in the </span><b style="font-family: Arial; font-size: 14.6667px; white-space: pre;">RunModeServlet </b><span style="font-family: Arial; font-size: 11pt; white-space: pre;">is using any @Reference annotation, all the services </span><span style="color: black; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre;">injections will </span><span style="color: black; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre;">be null. To solve this, p</span><span style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;">ass the service reference via the constructor to the servlet </span><span style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;">like shown in the code.</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;"><br /></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;"><span style="font-family: Arial; font-size: 11pt;"><b>Note</b>: <b>In this case in the ServletRegistration class need to have all the service injections using @Reference annotation and need to pass to the servlets via the constructor new </b></span><b style="font-size: 14.6667px;">RunModeServlet</b><span style="font-family: Arial; font-size: 11pt;"><b>(slingSettings).</b></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;"><span style="font-family: Arial; font-size: 11pt;"><b><br /></b></span></span></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;">2. In the </span></span><b style="font-family: Arial; font-size: 14.6667px; white-space: pre-wrap;">RunModeServlet, </b><span style="font-family: Arial; font-size: 14.6667px; white-space: pre-wrap;">we remove all the annotations and get the services via the constructor in place of @Reference annotation.</span></p><script src="https://gist.github.com/sgaem/0237e1f87ec605239163931969453dbe.js"></script><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 14.6667px; white-space: pre-wrap;"><br /></span></p></span><span style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;"><b>Note</b>: This approach works well but if you are registering many servlets dynamically, you always need to manage all the constructors for every servlet and pass the service reference from ServletRegistration OSGi service. To see so many service injections in this service (<span style="font-size: 14.6667px;">ServletRegistration </span>) can be overwhelming.</span><div><span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span></div><div><span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b>Is there any alternative way to handle it?</b></span></span></div><div><span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;">The answer is yes.</span></span></div><div><div style="text-align: center;"><b><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><u>Use a componentFactory to create instances of a component.</u></span></b></div><div style="text-align: center;"><b><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">[</span><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Preferred Approach</span><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">]</span></b></div><div><span id="docs-internal-guid-465a8acf-7fff-cfac-46f2-b96f038b84a5"><div><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">1. Use this on the component/servlet you want to create programmatically:</span></p><div align="left" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: none; table-layout: fixed; width: 468pt;"><colgroup><col></col></colgroup><tbody><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">@Component(factory= "aem.servlet.runModeServlet")</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">public class RunModeServlet extends SlingAllMethodsServlet {</span></p><br /><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"> @Reference</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"> private SlingSettingsService slingSettingsService;</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">@Override</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response){</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">}</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">}</span></p></td></tr></tbody></table></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><br /></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">2. Then in another component/service (ServletRegistration) you can get the ComponentFactory:</span></p><div align="left" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: none; table-layout: fixed; width: 468pt;"><colgroup><col></col></colgroup><tbody><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">@Reference(target = "(component.factory=aem.servlet.runModeServlet)")</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">private ComponentFactory runModeServletFactory;</span></p></td></tr></tbody></table></div><br /></span></div><div><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-d8b51d34-7fff-a7ab-f85e-5229e1ca936d"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">3. Create an instance from it and register the servlet like this.</span></p><div><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><div align="left" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: none; table-layout: fixed; width: 468pt;"><colgroup><col></col></colgroup><tbody><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Dictionary<String, Object> propertiesMap = getPropertiesMap(runModeServletPaths, "json", "GET");</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">RunModeServlet runModeServlet = (RunModeServlet) runModeServletFactory.newInstance(null).getInstance();</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">bundleContext.registerService(Servlet.class, runModeServlet, propertiesMap);</span></p></td></tr></tbody></table></div><br /></span></div><div><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-5ea70528-7fff-a22f-e630-8a2ff1eb4c6f"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><br /></span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><b>Note</b>: The way we have registered a servlet, you can register any service, filter or any authenticationHandler dynamically.</span></p><div><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><div align="left" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: none;"><colgroup><col width="628"></col></colgroup><tbody><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Dictionary<String, Object> propertiesMap = new Hashtable<>();</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">propertiesMap.put(AuthenticationHandler.PATH_PROPERTY, new String[]{endpoint_prefix, DamConstants.MOUNTPOINT_ASSETS});</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">propertiesMap.put(Constants.SERVICE_RANKING, 100000);</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">propertiesMap.put(Constants.SERVICE_DESCRIPTION, "Custom – Authentication Handler");</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">bundleContext.registerService(AuthenticationHandler.class, customAuthenticationHandler, propertiesMap);</span></p></td></tr></tbody></table></div></span></div><div><br /></div><div><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">I hope you find it interesting and useful.</span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">Thanks and Happy sharing.</span></p><br /></span></div></span></span></div></span></span></div></span></div></div>Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com4tag:blogger.com,1999:blog-7481371294519000730.post-3499210679190893762020-09-15T04:34:00.001+05:302020-10-27T07:58:10.510+05:30How to Use Encrypted Password for OOTB Configurations<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Hello Everyone, </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">It’s been so long since I wrote something. So here is a new blog about some issues I faced </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">recently and what are my leanings from there.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">1. <b>Encrypted Password for OOTB Configurations</b>: We always talk about making </span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">passwords </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">in an encrypted value as part of the </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">code base to secure the password.</span></div>
<span id="docs-internal-guid-0ea958f3-7fff-639a-e641-08eaf25f5321"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">To tackle this issue, we always talk about </span><a href="http://www.sgaemsolutions.com/2019/12/cryptosupport-in-aem-65.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">CryptoSupport in AEM</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">. So basically if there is a custom configuration and a need to use an encrypted password, I can use the concept of cryptosupport in AEM. </span></span><br />
<br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">But there are few OSGi Configurations in AEM like “</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">JDBC ODBC Connection Pool</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">” or </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">“Adobe Granite SAML 2.0 Authentication Handler</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">” having password fields, So can we use cryptosupport concept here too??</span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">So the answer is yes, you can keep encrypted value in the “password fields” directly in these configurations and for the decryption part, you don’t need to worry. AEM will take care of it.To encrypt a password, go through the </span><a href="http://localhost:4502/system/console/crypto" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">cryptosupport console in AEM</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">.</span><br />
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Conclusion</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">: We need to understand this very clearly that if we define a field as <b>"Password type"</b> either in OOTB or custom configurations, we don’t need to worry about decryption part, just configure the encrypted value in the field and AEM will understand that because it is a password field, it may need to decrypt it.</span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">But if your field is a plain text, then you have to take care of the decryption part as mentioned in the previous </span><a href="http://www.sgaemsolutions.com/2019/12/cryptosupport-in-aem-65.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">post</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">.</span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="48" src="https://lh6.googleusercontent.com/7WAYqYGYDfG7IwjwQP3yYScO9hJmHFiRIgll2ZwGZX2kStStruCtVe28Uul_hnD32l6qZBTGww8O88N87AOj3XY9OLJ4mwtHzr-UwJo_X14ayDRnJHtiWiDJp2LqB1Lz83g_SbpR" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="531" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig1: For a password field, no need to write logic for decryption.</td></tr>
</tbody></table>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">2. <b>AEM SAML Configuration in the Code Repository Issue</b>: Recently while working on a project, I configured AEM SAML integration on the author instance and it just works fine. Now this was the time to put the config in the code repository. So,</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">a) I put that config in the code repository (at /apps/<project-folder>/config.author.dev/com.adobe.granite.auth.saml.SamlAuthenticationHandler-myproject.xml</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">b) Deleted the manually created SAML configuration in Felix Console and performed a build and I was able to see the SAML config added by code.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">c) I hit the Author URL and it doesn't take me to the IDP login page.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">d) I go to felix, open SAML config, click Save (without touching anything else) and I hit Author URL again and now it takes me to the IDP login page.</span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Exactly the same issue I found on </span><a href="https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-saml-configuration-in-code-repository/qaq-p/285936" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Adobe Community</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> and the solution work for me.</span><br />
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Solution</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">:</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">a) Name the file as: "com.adobe.granite.auth.saml.SamlAuthenticationHandler-<Project_Identifier>.config" (Make sure it is a regular file in Eclipse or IntelliJ); no need to add extension ".xml" at the end.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">b) Inside this file, just add the configuration like a regular text. Please see below:</span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"># Configuration created by Apache Sling JCR Installer</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">// Storing keyStorePassword as an encrypted manner.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">keyStorePassword="{41bdcd34d9a34ae1c68bafa6b7b647443c429ad97e00a9f2cb5f876b2433}"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">service.ranking=I"5002"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">idpHttpRedirect=B"false"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">createUser=B"true"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">defaultRedirectUrl="/content/project/en/aem-assets.html"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">userIDAttribute="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">assertionConsumerServiceURL=""</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">defaultGroups=["contributors"]</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">signatureMethod="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">idpCertAlias="certalias___xxxxxxxxxxxx"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">addGroupMemberships=B"true"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">path=["/content/projects"]</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">digestMethod="http://www.w3.org/2001/04/xmlenc#sha256"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">synchronizeAttributes=""</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">clockTolerance=I"60"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">groupMembershipAttribute="groupMembership"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">idpUrl="IDP URL GOES HERE"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">logoutUrl="logouturl"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">serviceProviderEntityId="service_provider_entity_id"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">handleLogout=B"true"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">spPrivateKeyAlias=""</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">useEncryption=B"false"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">nameIdFormat="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<br /></div>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: 14.6667px;">You can also copy the content of the file from CRXDE, after you manually save the OSGi config thru /system/console/configMgr.</span></span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>Note</b>: This solution really worked for me,but logically it didn’t make any sense to me as while working on another project on AEM 6.5.4, the xml file used to work for me. I face this issue only in AEM 6.5.5 till now, </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">So can’t really comment if this is an upgrade issue or something else. </span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">So,If you face this issue in any of the AEM versions, you can directly try this solution.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="background-color: white; color: #222222; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">I hope you find it a good read.</span><span style="background-color: white; color: #222222; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">Thanks and Happy Learning.</span></div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com3tag:blogger.com,1999:blog-7481371294519000730.post-55409611870565939592020-04-22T21:28:00.000+05:302020-04-22T21:28:04.494+05:30AEM Workflow: Request for Deletion Workflow in AEM<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVUDv0uNu_0nz6MKqNfT49xkabeem85ktDlXBNJpSUermV9bixhh0qk9BSNBycg89KZMVw36RU9-Kh7uisUTOJx6w61QHE7ISx9TZBcoAQIG1Bcq9qVzUwv_SuKNHCtd8W9udtrDyFnDjc/s1600/blog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="919" data-original-width="1600" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVUDv0uNu_0nz6MKqNfT49xkabeem85ktDlXBNJpSUermV9bixhh0qk9BSNBycg89KZMVw36RU9-Kh7uisUTOJx6w61QHE7ISx9TZBcoAQIG1Bcq9qVzUwv_SuKNHCtd8W9udtrDyFnDjc/s320/blog.png" style="display: none;" width="320" /></a></div>
<span id="docs-internal-guid-01178842-7fff-af15-8cb7-61c8a0897b21"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Hello Everyone,</span></span><br />
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Request for Deletion is an AEM OOTB Workflow. In this blog, we will talk </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">about,</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;">1. What is a request for deletion workflow?</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;">2. How it works?</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;">3. What are challenges </span><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">with this workflow?</span></div>
<span id="docs-internal-guid-20725d82-7fff-c6a9-e533-c519b2392c38"><br /><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Request for Deletion Workflow: </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">This workflow gets initiated when the content-authors don’t have replicate permissions and try to delete a page.</span></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Request for Deletion OOTB workflow has four steps:</span></div>
<span id="docs-internal-guid-3a3ec632-7fff-539a-9fac-8b118c836559"></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="467" src="https://lh5.googleusercontent.com/ADBMEg8VX8lBw0vHcnu1iMf2DAHeGD3CKf4A2NSuvYOE1tfwWoUtadmbaYgZnCeO-ViOCPHhw06lVZMPNGmcgFoa_8BHqwqm5S6if3-NQQeS8t7ac75sFGkgWtz_4MKl84C87gNL" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="340" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b><i>Fig1: OOTB Request for Deletion Workflow </i></b></td></tr>
</tbody></table>
<br style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;" />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>Step1: </b>When an author delete a page, "Request for Deletion" step gets executed and it initiates a notification to the administrators by default (you can change it to approver group).</span><br />
<div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>Step2: </b>When the approver approves the request, the page gets deactivated from the publisher.</span></div>
<div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>Step3: </b>Again a request goes to the administrator or content-approvers to take the approval to delete the page in the author instance.</span></div>
<div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>Step4: </b>When the request gets approved, the page gets deleted from the author server.</span></div>
<div>
<br /></div>
<div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-5d77524b-7fff-e5e9-1217-f2a4e36955b1"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Product Bug: </span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">When the author deletes the page, a request for deletion notification is visible to the approver inbox, but after the approver approves the request and workflow completes deactivation of page step, the workflow itself aborted after step2.</span></div>
<span id="docs-internal-guid-5d77524b-7fff-e5e9-1217-f2a4e36955b1">
</span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-5d77524b-7fff-e5e9-1217-f2a4e36955b1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Because of this issue, the page is getting deactivated from publish but the page is not getting deleted from author CRXDE and because of that all the pages authors deleted in author instance are not visible in Sites console but still sitting in CRXDE.</span></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="125" src="https://lh3.googleusercontent.com/4yiStkdqvTSswC_YYZrFfTlxVtPb1EyFPExlL228dzCq2_ML2LW8aPIRBaKljDf-DCYcQup08QIFOfZ17GmK02EmYEKWXkgchJ7Ir1nXz56RyAiO7FlhxWMF1PG3CVSI6A9WQSPU" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="616" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b><i>Fig2: Request for Deletion workflow history to show aborted scenario</i></b></td></tr>
</tbody></table>
</div>
<div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-5d77524b-7fff-e5e9-1217-f2a4e36955b1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-568df228-7fff-f6eb-61ce-520651cb8144"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">I raised it as a day care and this is what they replied.</span></span></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b>Solution</b>: “I looked at the code that gets triggered in this event (an event handler). What it actually does is, trigger a Request for deletion workflow with system user <b>wcm-workflow-service,</b> when the user deleting the page does not have enough permission.</span></span><br />
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">
<b>Now if you provide delete and replicate permission to that user "wcm-workflow-service" at the /content level the workflow is getting completed successfully.</b></span></span><br />
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">
Always remember that Request for deletion workflow has two participant steps, so you need to approve twice, once for <b>deactivating the page</b>, then for the<b> deletion of the resource</b> step.”</span></span><br />
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">And the above mentioned solution worked for me.</span></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="124" src="https://lh3.googleusercontent.com/IWWK2a3ehFOBX0IPgsWP-MIOeGu2D3Prl9L4pb8U1GjBtc6ggIdvcxM5AqsyOPOtRukRFKS7u_RyOjJ6nap4SmBZcek81sgMCGAvcyQ-phZxYF174TUZyWqYv2UGk7C-7xMnEd_X" style="font-family: arial; font-size: 11pt; margin-left: auto; margin-right: auto; margin-top: 0px; white-space: pre-wrap;" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b><i>Fig2: Request for </i></b><b><i>Deletion </i></b><b><i>workflow history after fixing permissions</i></b></td></tr>
</tbody></table>
<span style="color: black; text-align: center; vertical-align: baseline;"><span style="font-family: "arial"; font-size: 11pt; white-space: pre;"><b>Note</b>: I face the above issue in AEM 6.5.2, so I am not sure what all AEM version has this </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: black; text-align: center; vertical-align: baseline;"><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">issue.</span></span><span style="font-family: "arial"; font-size: 11pt; text-align: center; white-space: pre;">So check accordingly.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; text-align: center; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: black; text-align: center; vertical-align: baseline;"><span style="font-family: "arial"; font-size: 11pt; white-space: pre;"><b>Client Concern</b></span></span><span style="color: black; font-family: "arial"; font-size: 11pt; text-align: center; vertical-align: baseline; white-space: pre;">: </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: black; font-family: "arial"; font-size: 11pt; text-align: center; vertical-align: baseline; white-space: pre;">Deletion is a very crucial activity which can lead to loss of content/pages </span><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">if </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">done unintentionally.</span></div>
<div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">That’s why AEM provided approvals at two levels. But in our project, client concern was </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">that it’s quite annoying for the content-authors, when they just delete a unpublished page </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">from the author</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">, for this also it asks for two level approvals.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">So here we removed the second level approval by considering that if approver approved</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">at the first step, it means that he really doesn't want that page/content in author as well as </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">publish.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">And i think it really make sense too as it is very difficult to manage so many approvals also.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="321" src="https://lh5.googleusercontent.com/KVSW7VT9clVJlDXojRMYWbJpfrxxilKH3sSx3po9w7-7aMxa6qsGfkLIeBmmF9pNg2lZfDQ36k22TOMjl2zzCTdyU_MNvKQxorYDSVdV7ntschXWwnf6MF6py1_7h4ddNyLC0Xgf" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="283" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b><i>Fig4: Workflow model after removing the approval step</i></b></td></tr>
</tbody></table>
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b>Note: </b>Always remember, before you hand over the production server to content-authors, always decide the workflow for request for deletion, make the authors aware about it and test it once because after authors start authoring, and you face this kind of product bug, where pages still exist in author after deletion, you have to fix them by going to the crx and this is hectic task also for a developer and authors.</span></span><br />
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><span style="background-color: white; color: #222222;">I hope you find it a good read.</span><span style="background-color: white; color: #222222;">Thanks and Happy Learning.</span></span></span></div>
<span id="docs-internal-guid-5d77524b-7fff-e5e9-1217-f2a4e36955b1"><span style="font-family: "arial"; vertical-align: baseline;"><span id="docs-internal-guid-568df228-7fff-f6eb-61ce-520651cb8144">
</span></span></span></div>
<span id="docs-internal-guid-5d77524b-7fff-e5e9-1217-f2a4e36955b1">
</span></div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com4tag:blogger.com,1999:blog-7481371294519000730.post-17753799876801546652020-04-21T20:01:00.004+05:302020-04-22T21:06:26.562+05:30Troubleshooting in AEM with real time use cases<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmko5GsSlNI9zT6ETYJn7nJZCSbThalFGbGnabwL7E19DUdPdjbILCKy0pKH8uLz2Lm6i3fiWLEmfLHH4MKoXXAVeFEphjm2V8DSKjhD8Xw8g3Rtc76gKC9XkJ__lrjFoEhcZDZ9a6GT07/s1600/blog1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="918" data-original-width="1600" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmko5GsSlNI9zT6ETYJn7nJZCSbThalFGbGnabwL7E19DUdPdjbILCKy0pKH8uLz2Lm6i3fiWLEmfLHH4MKoXXAVeFEphjm2V8DSKjhD8Xw8g3Rtc76gKC9XkJ__lrjFoEhcZDZ9a6GT07/s320/blog1.png" width="320" style="display: none;"/></a></div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">Hello Everyone,</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">In this blog, I will talk about some of the real time issues, I faced while working on a project.</span><br />
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre;">Here we will talk about the problem statement and how to tackle these problems.</span></span><br />
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre;"><span style="font-family: "arial";">1. </span></span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">The multiple PDFs were not able to move to a specific location: </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> In AEM, ideally you can select multiple PDF’s and move to a specific location. While working on a project in AEM 6.5.2, The authors in this project were able to move a PDF to a certain location but they were not able to move multiple PDFs in one go.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">When I found the issue, I checked the console and realized that the OOTB JS </span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(/libs/dam/gui/coral/components/admin/moveassetwizard/clientlibs.js) is breaking.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">I raised this as a Product Bug to Day Care and below is the solution which they provide me.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-d232bc9c-7fff-153f-43ef-e9ec893ef3ab"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">“This is an issue with 6.5.1 and 6.5.2 which should be fixed in 6.5.3 release”.</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Workaround</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-9d663c70-7fff-631f-f0e1-f9151f96b663"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The present workaround is to replace line 251 at </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">/libs/dam/gui/coral/components/admin/moveassetwizard/clientlibs/js/wizard.js </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">with the below code.</span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Old code snippet:</span></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="424"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">var newName = $(".rename-item-name").val().toLowerCase();</span></div>
</td></tr>
</tbody></table>
</div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">New code Snippet:</span></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="431"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">var newName = $(".rename-item-name").val();</span></div>
</td></tr>
</tbody></table>
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">you can create an overlay for the above mentioned JS file and later uninstall it when you plan to install 6.5.3.</span></span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">2. </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; white-space: pre-wrap;">While using reference components, the authors are not able to decide which component they need to refer in the pathbrowser.</span></div>
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa">
</span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">There is a real time scenario where we need to use the same component in several pages and for that particular use case reference component is very helpful. </span></span></div>
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa">
</span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Let's suppose we are having some tables which are being shown in many pages. Now suppose the author created a page "P" to put all the tables and try to reference the tables in actual pages from that centralized page.</span></span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">Now as the page "P" is having so many table components, so while using reference </span></div>
<div>
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">components </span><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">to </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">point to a specific table, it is difficult to identify by the content-authors which </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">table they need to point, </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">because </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">in the pathbrowser, the component node name is being shown.</span></span></div>
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa">
</span>
<br />
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="145" src="https://lh6.googleusercontent.com/DKvD1jrLlyVOQcMto6ms2O-q3yFR5S4TWGCCFQmaShDp-do02zzRc4hgJXSALjNHDM3WooJZULwma6yvdHJXEjdk9k0P3eDgHp9-84c9aOdZfCq0PLlfuNYD1vmpAnWSpnS-Fh_M" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="556" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b><i>Fig1: Reference Component dialog for choosing a table component</i></b></td></tr>
</tbody></table>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">While debugging out the </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>pathbrowser</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> behavior, I figured out that in </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">“/libs/granite/ui/components/foundation/form/pathbrowser/render.jsp”,</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b> line No 42, </b></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">the pathbrowser shows the “jcr:title” of the resource value and if not available then shows </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">resource name.</span></span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="73" src="https://lh3.googleusercontent.com/2_qYfzWKaimMCwNnT9uJ6jNyGxt1_qfobYJlKl86B_DN5EHm9kOuOxgwnAZPtQIEMmMLLajc8UTjaTKqT-Gr3HGRrYTrMDG2lsM0yM3B3pzJac7Iqe0B-uJjuqSaobnKCelVFTAu" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="532" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b><i>Fig2: PathBrowser component render.jsp logic</i></b></td></tr>
</tbody></table>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">So to solve this issue; We can provided a title field with name property “jcr;title” </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">in table component so that if the authors can provide a “title” to the table to define what this </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">table is about, then in the pathbrowser, the title will be visible and authors are able to </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">point to the correct component while using reference component.</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">You can do it for all the components by making a generic tab, so that whenever authors </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">face this issue, they can immediately provide a “jcr:title” to the component.</span></span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="153" src="https://lh3.googleusercontent.com/BtWaAjZ1r0wqzT60_jea8M9X4ucd7s4ZY3FPf9mMXcgs5_AR4kBFvfS88R3I_VxAtsEIUXchRrfuHaFg2fHZKDdhXjh5Dxdw1xFyzBKJhUC-EFsF1ZoGScm-4cznH-cu2tjL7RtI" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="547" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b><i>Fig3: After providing jcr:title the view in pathbrowser in reference component</i></b></td></tr>
</tbody></table>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre;">3. While login via a user which is part of "content-authrs" group, the “Modified By” </span></span><br />
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre;">for </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre;">Asset is </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre;">visible as “External User” but not as the </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre;">actual </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre;">person name</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">:</span></span></div>
<div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">Usually to set up content-authors permission for a specific project, we take reference</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">from OOTB content-authors and then add more permissions based on the additional </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">hierarchies for the specific project.</span></span><br />
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><br /></span>
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">But there can be some permissions which AEM OOTB content-authors don’t have </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">but you need to </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">provide them.</span></span></div>
</div>
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">For the assets, content authors are not able to see who modified the image last, but can </span></span></div>
<div>
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">see “</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">External User</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">” as ” </span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">Modified By</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">” for all the images.</span></span></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="244" src="https://lh3.googleusercontent.com/6Et5SkZN_lpyRsM03Z2kmMz7b51IdjoxVKfzcLZzl42xRgiHNxXL8fJhLfRTERG6TXyofnHse9dhaqojWKkaguyb6S42cG8sO6-7TjAlyQuHY6bVbbxxu4prho-E7fLtw_nihfYz" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="299" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b><i>Fig4: The "Modified By" as "Extenal User" while logging from content-authors</i></b></td></tr>
</tbody></table>
</div>
<div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span id="docs-internal-guid-8fd3b418-7fff-4c90-c476-79afd4f42297"></span><br /></span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Solution</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: I go through the code and found out that the column preview ‘s HTML is </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">getting </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">rendered from here:</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">/libs/dam/gui/coral/components/admin/contentrenderer/column/columnpreview/columnpreview.jsp</span></span></div>
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="182" src="https://lh5.googleusercontent.com/LJNavp78UMLGuFTxHoeQt6HUbIsv2fYljt2LC93uwoW_7n8XVN7jEfz8tQoMOnMBGa6tQXcQQwmimKnXthTKsvSkKTsA-wFdwqfIwyBP4g8vGlhVsf3mOPR-GfanqFGVDAA7_JLs" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="567" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b><i>Fig5: The logic from where modified by is visible in Assets columnnview</i></b></td></tr>
</tbody></table>
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span id="docs-internal-guid-4581f7ed-7fff-dcb0-aa1f-8ca5f952bcd1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span><span id="docs-internal-guid-4581f7ed-7fff-dcb0-aa1f-8ca5f952bcd1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span><br /></span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">So basically to fetch the value of "Modified by" the code is trying to get the formatted Name which can only be accessible when the author has "/home/users" permission.</span></span></span></span><br />
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">To solve this issue, you need to give read permission to “/home/users” hierarchy to content-authors and it will start showing the actual user who modified the assets last.</span></span></span></span></div>
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="246" src="https://lh6.googleusercontent.com/o8NvyF7LhlIaQWkydQ32k-4X3RFgYh4-CT0cL_v-lrxlV6NNBrlUNNQCqTE0yhuWcEpq2vIxUBNUhVulj-KBg9S1jVptAhLA7TMi7Kr_ubZycsVsvXQrOoP4qgLk7uvVY3SVouNz" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="300" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b><i>Fig6: After fixing the permission, the "Modified By" is showing "Actual User"</i></b></td></tr>
</tbody></table>
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa"><span style="background-color: white; color: #222222; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><br /></span>
<span style="background-color: white; color: #222222; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">I hope you find it a good read.</span><span style="background-color: white; color: #222222; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">Thanks and Happy Learning.</span></span></div>
</div>
<span id="docs-internal-guid-dbf9501a-7fff-4096-9e81-f96d9b8335fa">
</span></div>
</div>
</div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com1tag:blogger.com,1999:blog-7481371294519000730.post-89197528377279991372020-04-18T21:49:00.003+05:302020-09-15T08:23:43.524+05:30 Issues in sorting the results based on Published Date in AEM<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Hello Everyone,</span><br />
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; white-space: pre;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; white-space: pre;">Problem Statement:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">Need to sort a page hierarchy based on the last published date. So the page which is </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">being published last, should be visible first.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The problem looks very simple but it was not that simple. Using an AEM </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">query, pages can be sorted based on "cq:lastReplicated" and it works perfectly fine for the author. But when the code is being deployed in the publish server, the query was not giving same results as author.</span></div>
<div>
<span id="docs-internal-guid-292d2e97-7fff-de9b-77f5-1a1af7ba92d4"><br /></span>
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">Here is the query to sort pages based on cq:lastReplicated: </span><br />
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="272"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">path=/content/we-retail</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">type=cq:Page</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">orderBy=@jcr:content/cq:lastRelicated</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">orderby.sort=dec</span></div>
</td></tr>
</tbody></table>
<b style="font-family: arial; font-size: 14.6667px; white-space: pre-wrap;"><br /></b></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><b>Why the query was not providing the same results in Publish as author?</b></span></div>
</div>
<div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-f421c65d-7fff-c72b-fa55-bbe751a30ec8"><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">The publish server doesn't have "cq:lastReplicated" property and that’s how the logic is getting failed.</span></span></span></span><br />
<span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span></span>
<b style="font-family: arial; font-size: 14.6667px; white-space: pre-wrap;">What I tried?</b></div>
<div>
<span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-f421c65d-7fff-c72b-fa55-bbe751a30ec8"><span style="font-size: 14.6667px; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial";"><b>Approach 1</b>: After a bit research, I found out that "<b>cq:lastReplicationAction, cq:lastReplicated, cq:lastReplicatedBy properties are not carried over the publish by OOTB AEM design</b>". In order to carry these properties, disable this component "</span></span><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b>com.day.cq.replication.impl.ReplicationPropertiesFilterFactory</b>" </span></span><span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">in the author instance.</span></span></span></div>
<span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-f421c65d-7fff-c72b-fa55-bbe751a30ec8">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="38" src="https://lh6.googleusercontent.com/n9x9Bb1erannjvZQ5Gqvqb3zucqC1ulNpWKWwO0OON7YWyO74QlfZxpQ0qyMmILk264hHWLWeKxNz3Sja1u70woAlLbZMrd_qyV0pLnwGQ62CB8R3pLtoGg4SP2fhl-F1YrZ7N2Y" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="585" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><i>Fig1: com.day.cq.replication.impl.replicationPropertiesFactory Component</i></td></tr>
</tbody></table>
<div>
<span style="font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">The components gets enabled when the server restarts.To make it not getting enabled on server restart, Use "<b>ACS AEM Commons -OSGi Component disabler</b>" OSGi configuration to disable it permanently.</span></span></span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="184" src="https://lh5.googleusercontent.com/JP426HVHI3zjHHTFZhGVQkhYZRyqX7OqxXzk1hRWZh6bLIHGUVcAjF6glASt6tTlwxvKAXmzapSVivpm4dtR92DFAZNUNfAeSkKwU6DIPecSPgVMBrYkbgx4p9OIUMFn6DezK3aZ" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="568" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><i>Fig2: ACS AEM Commons-OSGiComponent Disabler COnfiguration</i></td></tr>
</tbody></table>
<div>
<span style="font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">After this, when a page gets activated, all the replication properties started to be carried over to the publishing server and it seems that the problem is solved now, but still the results were not same as expected.</span></span></span><br />
<span style="font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span></span></div>
<div>
<span style="font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">Why this approach didn't work out?</span></span></span><br />
<span style="font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span></span></div>
<div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">1. If a new page gets created in the author at 2:00 AM and publish the page then there is no cq:lastreplicated in the publish server for the first time.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">2. If you have a page being published at 2:00 AM and now you are again publishing it at 3:00, the lastReplicated Date in the publish server will be 2:00 AM because when a node gets replicated from author, first it goes it to publish and then it update the date in author. So by this, publishers were not having the replicated date matched by the author but one step behind the author.</span></div>
<div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="475"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">cq:lastReplicated Date in author ≠ cq:lastReplicated Date in publish</span></div>
</td></tr>
</tbody></table>
</div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<span style="font-family: "arial"; font-size: 14.6667px; vertical-align: baseline; white-space: pre-wrap;"><b><br /></b></span></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<span style="font-family: "arial"; font-size: 14.6667px; vertical-align: baseline; white-space: pre-wrap;">So making "cq:lastReplicated" property available to publish didn’t solve the problem.</span></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<span style="font-family: "arial"; font-size: 14.6667px; vertical-align: baseline; white-space: pre-wrap;"><b><br /></b></span></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>Approach 2:</b></span><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> Then I realized that the "cq:lastReplicated" date in the author is the same as "cq:lastModified" date in publish. Because for publish when it gets the data, it consider that as last modified for the node.Ideally these values will be the same (ignoring seconds), if a page gets published and </span><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">it immediately goes to the publish server.</span></span></div>
</div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b>Note</b>: publish server don't take the cq:lastModified date from author, but it updates it's own date based on when it gets the data.</span></span></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b>It means cq:lastModified date is not carried over to publish from author.</b></span></span><br />
<span style="font-family: arial; font-size: 11pt; white-space: pre;"><br /></span>
<span style="font-family: arial; font-size: 11pt; white-space: pre;">So then how we can conclude this:</span></div>
<div>
<span style="font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-ee8f19d7-7fff-8dfb-7116-279fb67bb578">
</span></span>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="475"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">cq:lastReplicated Date in author </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: white; color: #222222; font-family: "arial"; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">≅</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> cq: lastModified date in publish</span></div>
</td></tr>
</tbody></table>
</div>
<span style="font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-ee8f19d7-7fff-8dfb-7116-279fb67bb578">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;"><b>Conclusive Points</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: So now there are two ways:</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">1. </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Either you can make your query based on the "<b>cq:lastModified"</b> date for both author/publish but you need to make the author aware that in author, results are based on last modified but in publish, it will be based on like the last Published date.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">2. Or you can make your query based on the run modes. If run mode is author make the query based on "<b>cq:lastreplicated</b>" date. But in case of publish, make the query based on the "<b>cq:last Modified"</b> date.</span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">So that's how <b>Approach 2 </b>solved the issue.</span></span><br />
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><span style="background-color: white; color: #222222;">I hope you find it a good read.</span><span style="background-color: white; color: #222222;">Thanks and Happy Learning.</span></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b><br /></b></span></span></div>
</span></span>
</div>
</span></span></div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com3tag:blogger.com,1999:blog-7481371294519000730.post-11966806693404669972020-04-16T21:30:00.000+05:302020-04-17T09:00:28.740+05:30Request to Complete Move Operation Workflow in AEM<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFsXwBg8rCXR2eg4Vr_fSqUaON8txpKhBDd0NmgSGldS-o1lMXfiNF6XAo_GCdyX8NC9HZW9WjZzZH_AwJQgSvGl3RoKZPLBEboru-47LRUhBQOqwW93K6ToYNufJmgNdskwnmq7Ov4RyG/s1600/blog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="919" data-original-width="1600" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFsXwBg8rCXR2eg4Vr_fSqUaON8txpKhBDd0NmgSGldS-o1lMXfiNF6XAo_GCdyX8NC9HZW9WjZzZH_AwJQgSvGl3RoKZPLBEboru-47LRUhBQOqwW93K6ToYNufJmgNdskwnmq7Ov4RyG/s320/blog.png" style="display: none;" width="320" /></a></div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Hello Everyone,</span></div>
<span id="docs-internal-guid-96b6cd5a-7fff-aab3-6272-f5bc185ddff0"><br /><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Today I will talk about an OOTB workflow provided by AEM which is </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">“Request to Complete Move Operation” </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Workflow</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">.</span></span><br />
<div style="text-align: center;">
<span id="docs-internal-guid-28f532b8-7fff-1221-fcbe-33f49eb375a7"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"><span style="border: none; display: inline-block; height: 275px; overflow: hidden; width: 281px;"><img height="275" src="https://lh4.googleusercontent.com/wJfi_Nf8qjwNd4rjX_d9WepfCHlH6kaSDpiErZub8t53aGV4RGD1FcHu3gYkI246BaqFar4mi2Y5C05qHsFgRlBcYoXEvxkhIk_MMNbxlAp9iG88AnoGszFgfS2JSq8hZs5XBM4J" style="margin-left: 0px; margin-top: 0px;" width="281" /></span></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">A little Background:</span></div>
<div style="text-align: center;">
<span id="docs-internal-guid-836996e3-7fff-630d-0ac3-77c760546bd8"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Usually to maintain a website from the content-authoring point of view, we maintain two </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">groups </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">one is content-authors and other is content-approvers.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Content-authors</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: This group is used to do content authoring and don’t </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">have replication access. which means they can not publish the pages and make them live.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-13d3ed04-7fff-b951-a7bb-25184dd25e39"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">Content-approvers: </span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">The people in this group review the content and publish the pages.</span></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">Ideally they used to have all the permission which content-authors are having with </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">additional permission of replicating the pages.</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><br /></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">How Move operation work and it’s behavior:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If approver (or anybody having replication access) is doing the move operation-</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">1. If the page is not published anytime before,then the move operation will only happen in author and page will not be get published until approver really publishes it.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">2. If the page is already published then the move operation happens in author and publish both. Ex: If page P, in A hierarchy is already published and approver is moving it to B hierarchy, then the Page P from A hierarchy will get deleted from the author as well as publish and the page P will start appearing in B hierarchy in the live site .</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">When the workflow (request to move operation) gets triggered??</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-248f45ea-7fff-8d49-f289-575893aed1b2"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If the move operation is done by content-authors (not having replication permission) then the </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">OOTB workflow “</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;"><b>request to move operation</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">” gets triggered. Now approver </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">has to approve the workflow to make it function like the above mentioned move operation.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Client Concern:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-77de835e-7fff-1687-7036-86741d907b87"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">There are so many content-authors, which are constantly moving pages from one place </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">to another and there are a lot of “request to move operation” inbox notification for approvers. </span><br />
<span id="docs-internal-guid-abb4fd63-7fff-50e2-d2a9-aac6f0594c44"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Clients don't want this workflow to be there, because there are hundreds of pages for which they are doing content pop and not living soon. They are still deciding hierarchy and in this process they keep on moving pages. In such scenarios, there are always so many workflows running.</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">What will happen If we remove the workflow :</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If content-author moves the published pages, then this movement will happen in author </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">only and then how i will make this move operation available in publish server.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-874ebd02-7fff-d578-b54f-f6e2febbe438"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Ex: If page P, in A hierarchy is already published and author is moving it to B hierarchy, </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">then the Page from A hierarchy will get deleted and will start showing in B hierarchy in author. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If they ask the approver to publish the page P from B Hierarchy, then the old page “P” is </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">still available in A hierarchy in the publish server and will never get deleted so we suggested </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">the client not to remove this workflow.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">How we can solve client issue:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-8b5e0abc-7fff-c887-754e-d7eb2c2c500d"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">What we suggested is, We will add one step in the workflow which will check if the page </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">is published/unpublished. If the page is unpublished, we will end the workflow, else the request </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">will go to content-approver and the workflow will be executed like it is happening right now.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Product Bug:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">We are having author/approve groups in place for our AEM servers.Ideally content authors </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">don't have replication permission and because of this when the author moves a page the </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"Request to Complete Move Operation" workflow is triggered. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Now take an example if the Page "P(Considering that the page is already being published and visible on live site)" is under "A" Hierarchy and an author trying to move it under "B" hierarchy Then the workflow triggers.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><b style="font-weight: normal;"><br /></b></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If without completing the workflow, approver publishes the "P" page sitting under "B" hierarchy, </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">then the workflow “request to move operation” workflow instance is also getting aborted and </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">now on the live site "P" page can be seen under A and B both hierarchies and there is no </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">other way to delete the "P" page from "A" hierarchy,</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>Note</b>: Because the page is already being moved to B hierarchy, so in author "A" hierarchy don’t have a "P" page anymore.So approver can’t unpublish the old page.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; text-indent: -4.5pt; white-space: pre-wrap;">The issue is when an approver publishes the page, they don't even check if the "Request to Complete Move Operation" is running for that particular page and if they publish the pages,</span><span style="font-family: "arial"; font-size: 11pt; text-indent: -4.5pt; white-space: pre-wrap;">then there is no way to delete the old page (P under Hierarchy A) in publish server.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 14.6667px; text-indent: -6px; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 14.6667px; text-indent: -6px; white-space: pre-wrap;">I raised it as a Day Care ticket and will update here if Adobe comes up with any solution.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 14.6667px; text-indent: -6px; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 14.6667px; font-weight: 700; white-space: pre-wrap;">Workaround Solution by providing guidelines:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">1. We can make a guideline for content-authors not to move the page but to ask content-approvers to do that to avoid so many notifications for move operation or to avoid the workflow enhancement.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">2. </span><span style="background-color: white;"><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">We can ask content-approvers that before publishing a published page, at least check if there is any move operation workflow for that page running or not. If it is running, Complete that in place of publishing the page.</span></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-ce5dbe88-7fff-1bca-f940-5fc477c8f953"><span style="background-color: white; color: #373a3c; font-family: "arial"; font-size: 12pt; vertical-align: baseline; white-space: pre-wrap;">Once an approver opens the page during workflow execution, they may see a blue bar on the page with the following message:</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-e6895cd4-7fff-b1c5-b882-42556a5d1093"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span><span id="docs-internal-guid-e6895cd4-7fff-b1c5-b882-42556a5d1093"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span><span id="docs-internal-guid-98615d06-7fff-e22d-ded8-9a677a546e6e"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="border: none; display: inline-block; height: 52px; overflow: hidden; width: 622px;"><img height="52" src="https://lh6.googleusercontent.com/RmTh5MYhhs_Wr70b9O3ScKB4YaziC33BN-j4y5XpuRf3JgNEYQvbEPuKXb56yg8mLa4l7ZFqwZYM2jR3mcAtw3dE8_Ng8bkfoeluaNgJs-xttxY2kCYX4mz8LmGyVT5zEoN3fqjd" style="margin-left: 0px; margin-top: 0px;" width="622" /></span></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><b>But again guidelines can’t stop human error, So if</b></span></div>
<ul style="margin-bottom: 0px; margin-top: 0px;">
<li><span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">If content-authors are moving the pages then Be ready by completing so many workflows or make the workflow enhancement to solve this issue.</span></li>
<li><span id="docs-internal-guid-6196a990-7fff-2a75-0fd1-d1e5df5ee75d"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">if content-approvers are publishing the page for which move operation is already running, be ready to delete the pages in prod publish servers by going in CRXDE.</span></span><span id="docs-internal-guid-306a1f62-7fff-a62c-efa2-bec8095355ba"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span></li>
</ul>
<span style="background-color: white; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><br /></span>
<span style="background-color: white; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">I know this is a long and very</span><span style="background-color: white; font-family: "arial";"> </span><span style="background-color: white; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">theoretical but i hope it is a good and interesting </span><br />
<span style="background-color: white; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">read for you.</span><span style="background-color: white; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">Thanks and Happy Learning</span><br />
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="601"></col></colgroup><tbody>
<tr style="height: 60.25pt;"><td colspan="6" style="background-color: white; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><span id="docs-internal-guid-61a6b15e-7fff-6c5e-481a-1bd4f697c4e4"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span id="docs-internal-guid-61a6b15e-7fff-6c5e-481a-1bd4f697c4e4"><span style="background-color: transparent; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></div>
<span id="docs-internal-guid-61a6b15e-7fff-6c5e-481a-1bd4f697c4e4">
</span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span id="docs-internal-guid-61a6b15e-7fff-6c5e-481a-1bd4f697c4e4"><br /></span></div>
<span id="docs-internal-guid-61a6b15e-7fff-6c5e-481a-1bd4f697c4e4">
</span>
<br />
<div>
<span id="docs-internal-guid-61a6b15e-7fff-6c5e-481a-1bd4f697c4e4"><span style="background-color: transparent; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></div>
<span id="docs-internal-guid-61a6b15e-7fff-6c5e-481a-1bd4f697c4e4">
</span></td></tr>
</tbody></table>
</div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com1tag:blogger.com,1999:blog-7481371294519000730.post-80098243596417149742020-02-04T21:23:00.000+05:302020-04-22T21:25:55.228+05:30Metadata Profiles in DAM : AEM 6.3<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.295; margin-bottom: 8pt; margin-top: 0pt;">
<div dir="ltr" style="line-height: 1.295; margin-bottom: 8pt; margin-top: 0pt;">
<div dir="ltr" style="line-height: 1.295; margin-bottom: 8pt; margin-top: 0pt;">
<span id="docs-internal-guid-96a52d59-a8e0-2cfc-d0e3-66ae061c61c3"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">When we talk about DAM, the first thing that comes to our mind is collection of images, audios </span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">and videos etc. But when we look at AEM DAM, we are provided with a number of features that </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">are very useful and intriguing.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span><span id="docs-internal-guid-96a52d59-a8ea-8058-7900-7826dae68232"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">So today we will talk about Metadata Profiles for Digital Assets. There are a lot of Assets in a </span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">project and metadata is important to search in assets.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span><span id="docs-internal-guid-96a52d59-a8ea-cea2-3215-1e80753cf970"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">A Metadata Profile lets you apply default metadata to assets within a folder. Create a Metadata Profile </span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">and apply it to a folder. Any asset that you subsequently upload to the folder inherits the default </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">metadata that you configured in the Metadata Profile.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><b>How to create metadata profiles:</b></span><br />
<ul>
<li><span style="font-family: "arial";"><span style="white-space: pre-wrap;"><b><span id="docs-internal-guid-96a52d59-a8ef-2e8f-4de6-0bae3846dc2b" style="font-weight: normal;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">Go to Tools-> Assets-> Metadata Profiles</span></span></b></span></span></li>
<li><span style="font-family: "arial";"><span style="white-space: pre-wrap;"><b><span style="font-weight: normal;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">Create a metadata profile.</span></span></b></span></span></li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="182" src="https://lh5.googleusercontent.com/QzdOCznXBkRQLbLmL1quCHpPJvZANkoq32LyrOIYs3m9wGfUzSfZlK-D6uPW6tfHTvOKTk37P4mZ7ni58l6O_e6IG7TZkQhnxJxVUX8JfMqcZLDOxIKrm4R9fGiEmvWjqCRZVSqm" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="525" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig : Create Metadata Profile in AEM</b></td></tr>
</tbody></table>
<div style="text-align: left;">
</div>
</div>
<div dir="ltr" style="line-height: 1.295; margin-bottom: 8pt; margin-top: 0pt;">
<ul>
<li><span id="docs-internal-guid-96a52d59-a8f0-6512-5010-ec511f711e0a"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">The metadata profile will be opened with different widgets.</span></span></li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="196" src="https://lh5.googleusercontent.com/zmmglIadCAcGVESguRHi5w-2Of0zVkCGf6Ir5ryMoZ5c090QS763AzGC9jqyH0WF3vASJwsQF530MY2gCRYjptrkb1pmIxdflBMbXh6GgD4A88JcG-OCqZcXVXHLV_tmV_4zoH-y" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="469" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b style="font-size: 12.8px;">Fig : Add the widget in metadata profile</b></td></tr>
</tbody></table>
<div style="text-align: left;">
</div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">There are multiple widgets that can be added to a profile:</span><span style="font-family: "arial"; font-size: 14.6667px; white-space: pre;"> </span><br />
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre;"> </span><br />
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre;"> ➤ </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">Section Header</span><br />
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><span style="font-family: "arial"; font-size: 14.6667px;"> ➤ </span>Single Line Text</span></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><span style="font-family: "arial"; font-size: 14.6667px;"> ➤ </span>Multi Line Text</span></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><span style="font-family: "arial"; font-size: 14.6667px;"> ➤ </span>Number</span></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><span style="font-family: "arial"; font-size: 14.6667px;"> ➤ </span>Date</span></div>
<div style="text-align: left;">
<span id="docs-internal-guid-702100cb-abd2-1374-1d9a-199b068b3719"></span></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 8pt; margin-top: 0pt;">
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;"><span style="font-family: "arial"; font-size: 14.6667px;"> ➤ </span>Standard Tags</span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td><img height="331" src="https://lh3.googleusercontent.com/ZWj4RSoHHLJ3coSRvO1go6M93TLqHdbK2JkfVUO1Qr1ZEjJxy5xPvNbYHaezSZtbc0Lq9OkxLOSaDv4BRrbEg46OGDkKBiXx7RgruTwmB_872cVnVZsqQ_nk9c9j8S1ItUHSEXe4Ckuqoqk82Q" style="border: none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" width="258" /></td></tr>
<tr><td class="tr-caption" style="font-size: 12.8px;"><b>Fig : Widgets for adding in the Metadata Profiles</b></td></tr>
</tbody></table>
<span id="docs-internal-guid-96a52d59-a8f1-05b9-34b8-b515d84f1d5f"></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">A widget needs these options to be filled.</span><br />
<span id="docs-internal-guid-96a52d59-a8f1-05b9-34b8-b515d84f1d5f"><span id="docs-internal-guid-96a52d59-a8f5-14f5-8269-7b86a03c0737"></span></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td><img height="416" src="https://lh5.googleusercontent.com/Y94ClUrNkPVHt5-M0mYy4Jz_iOxfAuTNyav322ld9kuQqYm6-uenu0vjh3TRAIhwU8xoCexV350nGbw20Dk01vpGXF_SeavUcyNPTv2WfqhLbK-D6b2S6ySOS4Liw6LnXalTi5Rq" style="border: none; font-family: Arial; font-size: 11pt; margin-left: auto; margin-right: auto; transform: rotate(0rad); white-space: pre-wrap;" width="336" /></td></tr>
<tr><td class="tr-caption" style="font-size: 12.8px;"><b style="font-size: 12.8px;">Fig : map the widget with any property</b></td></tr>
</tbody></table>
<div style="text-align: left;">
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><b>Where all metadata profiles gets stored?</b></span></div>
</div>
<div dir="ltr" style="line-height: 1.295; margin-bottom: 8pt; margin-top: 0pt;">
<span id="docs-internal-guid-96a52d59-a8f5-9c81-a06d-ceb5d1285fe8"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">All metadata Profiles can be seen here </span></span><span id="docs-internal-guid-96a52d59-a8f5-d492-d4f7-ffeece46863a"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">“/conf/global/settings/dam/adminui-extension/metadataprofile</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">” like this:</span></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td><img height="258" src="https://lh5.googleusercontent.com/OBe9TpyMciD74f4TLMEeMj3KBAo-xdVVTdx_sqOexc7igV-qJBlbsn5kiqAI14p0LMqYi37bt1r82zQXaSk6CgeJjKcIuyy3JWVhBeWfxvjuYxniIkPqbLqmOffCxC8DC6xLRi9B_LBeJ09yOg" style="border: none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" width="356" /></td></tr>
<tr><td class="tr-caption" style="font-size: 12.8px;"><b style="font-size: 12.8px;">Fig : metadata profiles getting stored in conf</b></td></tr>
</tbody></table>
<u style="font-family: verdana, sans-serif; font-weight: 700; white-space: pre-wrap;"><span style="font-size: large;"><br /></span></u><span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><b>How to apply a metadata profile to any DAM Asset folder?</b></span></div>
<div dir="ltr" style="line-height: 1.295; margin-bottom: 8pt; margin-top: 0pt;">
<div dir="ltr" style="line-height: 1.295; margin-bottom: 8pt; margin-top: 0pt;">
<span id="docs-internal-guid-96a52d59-a8f6-166d-6ee9-ea410a00e6fd"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span></div>
</div>
<div dir="ltr" style="line-height: 1.295; margin-bottom: 8pt; margin-top: 0pt;">
<span id="docs-internal-guid-96a52d59-a8f6-ef71-0a39-e0a26ac589fe"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">When you assign a metadata profile to a folder, any sub folders automatically inherit the profile </span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">from its parent folder. This means that you can assign only one metadata profile to a folder. As </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">such, consider carefully the folder structure of where you upload, store, use, and archive assets.</span></div>
<div dir="ltr" style="line-height: 1.295; margin-bottom: 8pt; margin-top: 0pt;">
<span id="docs-internal-guid-96a52d59-a8f7-2add-202a-f10a26e7b7fe"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">If you assigned a different metadata profile to a folder, the new profile overrides the previous </span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">profile. The previously existing folder assets remain unchanged. The new profile is applied on </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">the assets that are added to the folder later. </span></div>
<div dir="ltr" style="line-height: 1.295; margin-bottom: 8pt; margin-top: 0pt;">
<span id="docs-internal-guid-96a52d59-a8f7-7e26-7477-b9d4f940d542"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Folders that have a profile assigned to it are indicated in the user interface by the name of the </span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">profile appearing in the card name.</span></div>
<div dir="ltr" style="line-height: 1.295; margin-bottom: 8pt; margin-top: 0pt;">
<span id="docs-internal-guid-96a52d59-a8f8-5728-5035-642e2f7e1ccc"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">After adding metadata profile to a folder,Under the jcr: content of a folder, you can see the </span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">metadata profiles which are attached to that particular folder.</span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="210" src="https://lh6.googleusercontent.com/qghpzJ_MCC7rCY7sKHJZMTsz5MNxS0lzoG5zY1hrE7gHzCPpCi1EkGd9FphMUTJ50nHXPSljVDl8AzF9LH66lbGWOfH4MfYz9kHvUfOkBii2dYFt8vDlZGUn6MDFNmFiGhFkWmB0" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="563" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b style="font-size: 12.8px;">Fig : applied metadata profile to dam assets folder</b></td></tr>
</tbody></table>
</div>
<span id="docs-internal-guid-96a52d59-a8f8-feea-8e5c-ada86ba2f511"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Note</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">: If you add something new to metadata profile, the previous existing assets can’t get </span></span><span id="docs-internal-guid-96a52d59-a8f9-1145-fd21-a93ab29fe7fe"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">updated with metadata until we run </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">“Dam Update Asset”</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> workflow on them. In Dam update </span></span><span id="docs-internal-guid-96a52d59-a8f9-2480-214f-09db0e971221"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">asset,</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">the process step named</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"> “Metadata Processor”</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> adds the metadata profile of that image.</span></span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td><img height="458" src="https://lh6.googleusercontent.com/oATUA9tyjlYoW9OLvEolkv71arL17-GCxwobXCJMpx8c95_BcB6s8ycT0nmWNPg43u_73RhSeiJp8vnSa51deHNZco-xqcov9fQsqs6imwkt4jc20f09_VKIErzxwPzZeT0xk8NSRSgqcutH8w" style="border: none; margin-left: auto; margin-right: auto; transform: rotate(0rad);" width="316" /></td></tr>
<tr><td class="tr-caption" style="font-size: 12.8px;"><b style="font-size: 12.8px;">Fig : Metadata profile processor for applying in dam assets folder</b></td></tr>
</tbody></table>
<span id="docs-internal-guid-96a52d59-a8fb-0c5e-af86-b70f8a6db3ed"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">All the metadata profiles need to be added in the </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">metadata </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">node of jcr: content each asset. </span></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="164" src="https://lh4.googleusercontent.com/_-SdL7QCMIp9N2cVIr2tFPK81eg8EOsUIRybpYnGjhhfdwqiNuBvCfj-L67lwFEGWuC2XAM0iS4SRJn8prtCSupPjKBJNHpV4wVJb16dlEPuD88Fwkqf6xuM1ffIKuP8YxJhEkHe" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="556" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b style="font-size: 12.8px;">Fig : added some property from metadata profile</b></td></tr>
</tbody></table>
</div>
<div dir="ltr" style="margin-left: 5.1pt;">
<br />
<table style="border-collapse: collapse; border: none;"><colgroup><col width="634"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-color: rgb(0, 0, 0); border-style: solid; border-width: 0.5pt; padding: 0pt 5.4pt; vertical-align: top;"><div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre;">Note: </span><span style="background-color: transparent; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Adding a default value to a new metadata property (which doesn't exist already at the .</span><span style="background-color: transparent; font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">/jcr:content/metadata</span><span style="background-color: transparent; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> node) does not display the property and its value on the asset's Properties page by default. To view the new property on the assets's Properties page, modify the corresponding schema form.</span></div>
</td></tr>
</tbody></table>
</div>
<span id="docs-internal-guid-96a52d59-a8fe-726a-53c8-7428b83cd126"></span><br />
<div dir="ltr" style="margin-left: 5.1pt;">
<br />
<b style="font-family: arial; font-size: 14.6667px; white-space: pre-wrap;"><span id="docs-internal-guid-96a52d59-a8ff-69e1-cd71-5c5d480bc414"><span style="background-color: white; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">Applying Metadata Profiles to folders from Properties:</span></span></b><br />
<b style="font-family: arial; font-size: 14.6667px; white-space: pre-wrap;"><span style="font-weight: normal;"><span style="background-color: white; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">1. In the left rail, click/tap </span><span style="background-color: white; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">Assets</span><span style="background-color: white; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"> then navigate to the folder that you want to apply a metadata profile to.</span></span></b><br />
<b style="font-family: arial; font-size: 14.6667px; white-space: pre-wrap;"><span style="font-weight: normal;"><span style="background-color: white; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-96a52d59-a8ff-7a22-ab11-a41c648ea64b"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">2. On the folder, tap or click the check mark to select it and then tap or click </span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">Properties</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">.</span></span></span></span></b><br />
<b style="font-family: arial; font-size: 14.6667px; white-space: pre-wrap;"><span style="font-weight: normal;"><span style="background-color: white; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-96a52d59-a8ff-8d01-2d70-c67721488979"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">3. Select the </span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">Metadata Profiles</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"> tab and select the profile from the drop-down menu and click </span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">Save</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">.</span></span></span></span></span></b><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="138" src="https://lh3.googleusercontent.com/aVGrjOTg9L4ClOpBm4vpsEHVt-GtK7B0FJUfjb43wuMO8rBJ839TvtT60gDBJaRC0mQ3wNkQYuaU4dUzEhmK90Vir5ViMgKTzqrWr2krQlPJFIbezyo75JUtYtW7tp0-M7JfveXP" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="540" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b style="font-size: 12.8px;">Fig : Apply the metadata profile by selecting the profiles in asset folder</b></td></tr>
</tbody></table>
</div>
<div dir="ltr" style="margin-left: 5.1pt;">
<span style="font-family: "verdana" , sans-serif; font-size: large; font-weight: 700; white-space: pre-wrap;"><u></u></span><br />
<div style="text-align: center;">
<span style="font-family: "verdana" , sans-serif; font-size: large; font-weight: 700; white-space: pre-wrap;"><u><b style="font-family: arial; font-size: 14.6667px;"><u>Applying a metadata profiles globally?</u></b></u></span></div>
<br />
<div>
<span id="docs-internal-guid-96a52d59-a8fe-726a-53c8-7428b83cd126"><span id="docs-internal-guid-96a52d59-a900-e772-476a-b3a58b49b4a1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">In addition to applying metadata profile to a folder, we can apply a metadata profile globally on the “</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">/content/dam”</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> folder from this link </span></span><span style="color: #0b5394; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><a href="http://localhost:4502/mnt/overlay/dam/gui/content/assets/foldersharewizard.html/content/dam" style="text-decoration-line: none;">http://localhost:4502/mnt/overlay/dam/gui/content/assets/foldersharewizard.html/content/dam</a></span></span><br />
<br />
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><b>Let's have a demonstration video on Metadata profiles in AEM DAM:</b></span></div>
<div style="text-align: center;">
<iframe allow="encrypted-media" allowfullscreen="" frameborder="0" gesture="media" height="315" src="https://www.youtube.com/embed/6Vxdr3LmU14" width="560"></iframe><span id="docs-internal-guid-96a52d59-a8fe-726a-53c8-7428b83cd126"></span></div>
<div>
<span id="docs-internal-guid-96a52d59-a8fe-726a-53c8-7428b83cd126"><br /></span></div>
<div>
<div style="text-align: center;">
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><b><u>Issues in adding standard Tag widget in AEM 6.3</u></b></span></div>
</div>
<div>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">In AEM 6.3, If we add “</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Standard Tags”</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> Widget in metadata profile form, add some default values and save it, when we again reopen the form the default values get disappeared.</span><br />
<div dir="ltr" style="line-height: 1.295; margin-bottom: 8pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span><span id="docs-internal-guid-96a52d59-a8fe-726a-53c8-7428b83cd126"><span id="docs-internal-guid-96a52d59-a905-026b-5315-6f6c8a7cd7df"><span id="docs-internal-guid-702100cb-ab87-1e8d-d950-122d2684953f"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Actually values get saved in metadata profile but values are not able to be picked up in the console.It was working fine in AEM 6.1. </span></span></span></span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">When we compare it with AEM 6.3 , we found out that in AEM 6.1 there is an attribute </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">data-default</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> is setting which shows these values, but in AEM 6.3 this </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">data-default</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> attribute is not setting.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">To solve this issue, we need to overlay “/libs/granite/ui/components/coral/foundation/form/autocomplete/render.jsp” with the following changes.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">After Line 132,</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> add </span></div>
</div>
<div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="335"></col></colgroup><tbody>
<tr style="height: 13pt;"><td style="background-color: #99ff99; border-color: rgb(26, 152, 31); border-style: solid; border-width: 0.75pt; vertical-align: middle;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; font-family: "arial"; font-size: 10.5pt; vertical-align: baseline; white-space: pre-wrap;">String str = cfg.get("default", "");</span></div>
</td></tr>
</tbody></table>
</div>
<span id="docs-internal-guid-96a52d59-a8fe-726a-53c8-7428b83cd126"><span id="docs-internal-guid-96a52d59-a902-4e8c-4b60-98d9d3a9fb87"></span></span><br />
<div dir="ltr" style="margin-left: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">After line 157</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">, add</span><br />
<table style="border-collapse: collapse; border: none;"><colgroup><col width="341"></col></colgroup><tbody>
<tr style="height: 15pt;"><td style="background-color: #99ff99; border-color: rgb(26, 152, 31); border-style: solid; border-width: 0.75pt; vertical-align: middle;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10.5pt; vertical-align: baseline; white-space: pre-wrap;">attrs.add("data-default", str);</span></div>
</td></tr>
</tbody></table>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">So you need to make these two changes and things will work fine for you.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="margin-left: 0pt;">
<div style="text-align: left;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b style="font-size: 14.6667px;">Let's demonstrate the above mentioned issue and its solution with the help of this video:</b></span></div>
<div style="text-align: center;">
<span id="docs-internal-guid-96a52d59-a8fe-726a-53c8-7428b83cd126"><span id="docs-internal-guid-96a52d59-a902-4e8c-4b60-98d9d3a9fb87"><span id="docs-internal-guid-96a52d59-a905-8138-ad2d-9fb8676bb5d7"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><iframe allow="encrypted-media" allowfullscreen="" frameborder="0" gesture="media" height="315" src="https://www.youtube.com/embed/tjWKYATqdjA" width="560"></iframe><span id="docs-internal-guid-96a52d59-a8fe-726a-53c8-7428b83cd126"><span id="docs-internal-guid-96a52d59-a902-4e8c-4b60-98d9d3a9fb87"><span id="docs-internal-guid-96a52d59-a905-8138-ad2d-9fb8676bb5d7">
</span></span></span></span></span></span></span>
<br />
<div style="text-align: left;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><span style="background-color: white; color: #0b5394; font-size: 9pt; font-weight: 700; vertical-align: baseline;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><span style="background-color: white; color: #0b5394; font-size: 9pt; font-weight: 700; vertical-align: baseline;"><span id="docs-internal-guid-b8afb9f5-5186-04f9-6bc9-d2bd9bd8867c" style="color: #222222; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13.2px; font-weight: 400; white-space: normal;"><span id="docs-internal-guid-b8afb9f5-5188-5eaf-1126-a3b022ba3375"><span id="docs-internal-guid-b8afb9f5-5188-a12d-8815-b809e789b41f"><span style="color: #0b5394; font-family: "arial"; font-size: 9pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"> </span></span></span></span><span style="color: #222222; font-size: 13.3333px;">Hope it will help you guys !!</span></span></span></div>
<div style="text-align: left;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><span style="background-color: white; color: #0b5394; font-size: 9pt; font-weight: 700; vertical-align: baseline;"><span style="color: #222222; font-size: 13.3333px;">Thanks and Happy Learning.</span></span></span></div>
</div>
</div>
</div>
</div>
<div>
<span id="docs-internal-guid-f9ae4f5b-7fff-30bd-6837-2b971319863b"></span><br />
<div style="text-align: left;">
<span id="docs-internal-guid-f9ae4f5b-7fff-30bd-6837-2b971319863b"><span style="font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-0540c592-7fff-bdbf-9196-b3c21896d415">
</span></span></span></div>
<span id="docs-internal-guid-f9ae4f5b-7fff-30bd-6837-2b971319863b">
</span></div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com1tag:blogger.com,1999:blog-7481371294519000730.post-6388398460933194312020-01-08T14:25:00.003+05:302020-01-08T14:31:22.032+05:30Major Vulnerabilities and Security Issues in AEM<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyAaH-_KzZBXGFOx_Xjs5EzpXjUmKs2pciYCKP774D39fVVjuE4jZWXEgq2tuq14V_o1TspBDT09DHVUyfcwYjr1RzW1dMU0e6xAHvE0NB20aAg6N6nwuVIoPac9GqXVN9fEWMmnPDDcLR/s1600/sgaem+blog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyAaH-_KzZBXGFOx_Xjs5EzpXjUmKs2pciYCKP774D39fVVjuE4jZWXEgq2tuq14V_o1TspBDT09DHVUyfcwYjr1RzW1dMU0e6xAHvE0NB20aAg6N6nwuVIoPac9GqXVN9fEWMmnPDDcLR/s320/sgaem+blog.png" style="display: none;" /></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">Hello Everyone,</span></div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial";"><span style="font-size: 11pt; white-space: pre-wrap;">While working with AEM, There are many security concerns which we need to take care at </span><span style="font-size: 14.6667px; white-space: pre-wrap;">Apache</span><span style="font-size: 11pt; white-space: pre-wrap;"> level to stop the attacker by attacking the website.</span></span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">There are few security Headers which are required to provide security in the Apache level.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">1. </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">X-XSS Protection</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">: X-XSS-Protection header can prevent some level of XSS </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">(cross-site-</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">scripting) attacks.</span><br />
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="528"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><IfModule mod_headers.c></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> <FilesMatch "\.(htm|html)$"></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> #Force XSS (should be on by default in most browsers anyway)</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Header always set X-XSS-Protection "1; mode=block"</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </FilesMatch></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"></IfModule></span></div>
</td></tr>
</tbody></table>
</div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">There are four possible ways you can configure this header.</span><br />
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">0: XSS filter disabled
1: XSS filter enabled and sanitized the page if attack detected
1;mode=block XSS filter enabled and prevented rendering the page if attack detected
1;report=http://example.com/report_URI XSS filter enabled and reported the violation if attack detected</span></span><br />
<span style="font-family: "arial"; font-weight: bold;"><span style="font-size: 14.6667px; white-space: pre-wrap;">Note:</span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">We will use 1:mode=block to implement this security.This need to be put in publish.vhost files for every domain.</span><br />
<div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<span id="docs-internal-guid-65e441e5-7fff-33f6-cc00-93cd12cd1c09"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">2. HTTP Strict Transport Security</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">:HSTS (HTTP Strict Transport Security) header to ensure all communication from a browser is sent over HTTPS (HTTP Secure). This prevents HTTPS click through prompts and redirects HTTP requests to HTTPS.Before implementing this header, you must ensure all your website page is accessible over HTTPS else they will be blocked.</span></span><br />
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="583"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;"</span></div>
</td></tr>
</tbody></table>
</div>
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Note: </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">AMS Users can just uncomment it base_rewrite_rules file.Enable it only if the server is on HTTPS.</span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<b style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">3. </span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">X-Fram</span></b><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">e-Options: </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Use the X-Frame-Options header to prevent Clickjacking vulnerability on your website. By implementing this header, you instruct the browser not to embed your web page in frame/iframe.</span><br />
<div align="left" dir="ltr" style="margin-left: 0.75pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="368"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><IfModule mod_headers.c></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Header merge X-Frame-Options SAMEORIGIN</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">"expr=%{resp:X-Frame-Options}!='SAMEORIGIN'"</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </IfModule></span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;">Note</b><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">: Put X-XSS Protection and X-Frame-Options in <IfModule mod_headers.c>.</span><br />
<b style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><br /></span></b>
<b style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">4. </span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">C</span></b><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">ontent Security Policy</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">: Prevent XSS, clickjacking, code injection attacks by implementing the Content Security Policy (CSP) header in your web page HTTP response.</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">The idea of this is that you can define all the third party domains from where you want to load anything on your website. So if attacker inject anything from </span><a href="http://www.attacker.com/" style="font-family: Arial; font-size: 11pt; text-decoration-line: none; white-space: pre-wrap;"><span style="color: #1155cc; font-size: 11pt; vertical-align: baseline;">www.attacker.com</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> and this domain is not in the list of content security policy, then those requests will not load on a page and you can see exceptions in the console.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">In the below example, you need to use your website domain in place of we-retail.com.</span><br />
<div align="left" dir="ltr" style="margin-left: 0.75pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="520"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Header always set content-security-policy "script-src blob: data: 'unsafe-inline'</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">'unsafe-eval' 'self' we-retail.com https://www.facebook.com </span><a href="https://www.google-analytics.com/" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">https://www.google-analytics.com</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> https://assets.adobedtm.com"</span></div>
</td></tr>
</tbody></table>
</div>
<span id="docs-internal-guid-292ab885-7fff-c769-c895-1c1f788def85">
</span>
<br />
<div align="left" dir="ltr" style="margin-left: 0.75pt;">
<b style="font-family: Arial; font-size: 11pt; white-space: pre-wrap;">Note</b><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">: To implement this security, if anytime you want to load and use any third party libraries, you always need to add the domain in this configuration.</span></div>
<div align="left" dir="ltr" style="margin-left: 0.75pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div align="left" dir="ltr" style="margin-left: 0.75pt;">
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-b0cb006b-7fff-2706-46da-a320dbc24e8e"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><b>Hope it will help you guys !!</b></span></span></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<b style="font-family: arial; font-size: 11pt; white-space: pre-wrap;">Thanks and Happy Learning.</b></div>
</div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com2tag:blogger.com,1999:blog-7481371294519000730.post-34029386870041138652020-01-05T12:10:00.000+05:302020-09-15T09:04:46.731+05:30Handing 301 Redirection in AEM using Redirect Map Manager<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmUFCPGWrsZF2KqB6qmhKtjTv433dfXnjTnbwuT7rpgERvAlfsXG_OQL7P4FL1euaG1AQVxzoWL8R2x7zUHsssKwC0wFwxGoVI-pBj87BOuWVSK0_jLgKXp3T8JY6QosoaJi-uU3ts2lRi/s1600/301.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmUFCPGWrsZF2KqB6qmhKtjTv433dfXnjTnbwuT7rpgERvAlfsXG_OQL7P4FL1euaG1AQVxzoWL8R2x7zUHsssKwC0wFwxGoVI-pBj87BOuWVSK0_jLgKXp3T8JY6QosoaJi-uU3ts2lRi/s320/301.png" style="display: none;" /></a></div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Hello Everyone,</span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">In one of my </span><a href="http://www.sgaemsolutions.com/2018/12/implement-301-and-302-redirect-in-aem.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">previous blog</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">, I explained about 301 Redirection and how to manage 301 redirects in AEM via page properties.</span></div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;"><b>Ideally when we need 301 redirection?</b></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">1. When you are completely changing the website with a new hierarchy of Pages and Assets, 301 redirection is needed.The idea is the old users who were using the website will never get 404 and still can be redirected to the correct place.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">2. If you want 301 redirection of internal URL’s to External Sites.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;"><b>Does the approach of 301 Redirection via page properties really solve the issue if not</b></span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;"><b>then </b></span><b style="font-family: arial; font-size: 11pt; white-space: pre;">why?</b></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">1. Let's suppose we have a old website /content/we-retail/en/home.html and now the new home page is /content/we-retail/home.html, we won't manage the old hierarchy in our AEM, then having 301 redirection in page properties won’t really help.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">2. The page properties 301 can only work, if you have a page just to create the hierarchy but you always want user to redirect to some other place.For instance: you have a page /content/we-retail/en and you want to 301 redirect to this page to home page.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-703da283-7fff-32f6-2e58-05fb51006242"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Conclusion: </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;">H</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">aving 301 redirection in page properties can not solve all the use cases of 301 redirection.</span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If we are managing single/multiple websites in AEM, we really want a full fledged solution to </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">handle 301 redirection.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-364148cc-7fff-997c-fcd8-6d95fe96aa0c"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ACS Commons Redirect Map Manager is really able to solve all the above mentioned </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">issues And we can manage all the 301 redirection at the Apache level itself.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">How to configure Redirect Map Manager for your project in AEM.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>1. </b>Go to </span><a href="http://localhost:4502/miscadmin#/etc/acs-commons/redirect-maps" style="font-family: Arial; font-size: 11pt; text-decoration-line: none; white-space: pre;"><span style="color: #1155cc; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">miscadmin </span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">console. Go to Tools->acs commons->Redirect Maps.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">2. </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Create a new Page.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="413" src="https://lh6.googleusercontent.com/Ph6wIDrOFJ4L6XCKm7zjYV0mmZ6q6wharexqrYFmxKi-OK1qWWfXxEK7IuzX8IIg2a9LmIPZI2YeR55z4NENFifn8Y3AagVFrdZ5NXzfH3LWflxxRFQwSiMmGi5ZCMZtfG0ACQJq" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="407" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig1: Create a page for Redirect Maps</b></td></tr>
</tbody></table>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">3. Enter the Title/Name of your redirect map and click Create.</span><br />
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">4.</span></span><span id="docs-internal-guid-da3748d8-7fff-6648-21c3-bdf9f5219fbd"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Upload a Redirect Map base file (optional). This can be useful for specifying miscellaneous or external redirects which aren’t found for pages in the AEM repository. For example, redirecting a particular URL to an external application.</span></span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">5. </span><span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">If you don't want to upload a file, Go to "<b>Edit entries</b>" Tab and “Add Entry” by entering Source and Target. Use source as relative path and target you can configure the relative path if you want 301 redirection at the same domain or can configure the full external domain to redirect.</span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="215" src="https://lh5.googleusercontent.com/Mglwe2QJUtzIYbHnkipTGXC5XgmOl1W2oxoZzw32cRw5wAB3_pc99sWE1j7ssGGzotkY5NU-kClsRb7o0whbAlyp-JPJ0UB_fMBGrLzr8_lyEkwcBJ7La6JrUyOW-pcS9dyv0qdJ" style="font-family: Arial; font-size: 11pt; margin-left: auto; margin-right: auto; margin-top: 0px; white-space: pre-wrap;" width="590" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig2: Add entries for 301 Redirection</b></td></tr>
</tbody></table>
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">6. </span><span style="font-size: 11pt; white-space: pre-wrap;">You can preview the list of all 301 redirection.In the “<b>Download Preview</b>”, you got the URL through which </span><span style="font-size: 14.6667px; white-space: pre-wrap;">Apache</span><span style="font-size: 11pt; white-space: pre-wrap;"> server can access this file from AEM.</span></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="259" src="https://lh5.googleusercontent.com/w1dmxtgVdFwZRpXUwGlUK0NxUZX0hZzMXKpwkM3wye65VnbI1gz_YhuNmYwGZRuoGUuXEWpjthszSvBKHjxNdz25-YCSBBEpUvHg7izCH7xq0wF6fuw_jHDxpROwm1VfCydiY94Z" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="435" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig3: Preview will show the link to access redirect map.</b></td></tr>
</tbody></table>
<span id="docs-internal-guid-1727f561-7fff-b271-3e9b-26e35a781f9b"></span>7. Publish the Redirect Map Pages.<br />
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre;"><u>Handling Configuration in Apache</u></span></div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">1. </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Add a bash script (redirect-map.txt) to pull the redirect Map file from publisher.</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">You can put it anywhere but i placed it in “</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">/etc/httpd/conf.d/redirects/redirect-map.txt</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">”. [The extension of the script can be .sh or .txt]</span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<script src="https://gist.github.com/gargshivani111/432d5e5cb20af8c64c3b3d8f81d0f282.js"></script>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Below is the explanation of bash script line by line.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>line No 4</b>: need to change with the publish private IP to which apache should able to connect.(Can be tested via telnet)</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>line No 5</b>:Need to define the log directory of the apache server</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>line No 7</b>:This is the name of the redirect map you created in your AEM. If there are multiple redirect map to handle multiple sites, you can add all the redirect Map pages name here.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>line No 12:</b> This line will start loop for all the map files one by one.Let’s see the execution of we-retail map file.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>line No 15:</b> Will remove the file from /tmp/we-retail.txt </span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>line no 16</b>:It will fetch the file from the publisher and put it in</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"> “/tmp/we-retail”</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> and log this activity in a log file named</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"> “update-redirect-map.log”</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>line No 17</b>: convert the /tmp/we-retail file to a DBM file and place the newly db files(.pag file and dir file) in conf directory. So the files gets created are /conf/httpd/conf/tmp-we-retail.pag and /etc/httpd/conf/tmp-we-retail.dir and log this activity in log file.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>line No 18</b>,Move the file from /etc/httpd/conf/tmp-we-retail.dir to /etc/httpd/conf/we-retail.dir</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>line No 19</b>,Move the file from /etc/httpd/conf/tmp-we-retail.pag to /etc/httpd/conf/we-retail.pag</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">From <b>Line 12 </b>to <b>Line 19</b> will execute for geometrixx also and for all the websites you will define in the above script.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">2.</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; white-space: pre-wrap;">Add a rewrite rule in the /etc/conf.d/rewrites/we_retail_base_rewrites.rules</span><br />
<div align="left" dir="ltr" style="-webkit-text-stroke-width: 0px; color: black; font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-left: 36pt; orphans: 2; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="409"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-color: rgb(0, 0, 0); border-style: solid; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin: 0pt 0px;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"># Rewrite rules</span></div>
<div dir="ltr" style="line-height: 1.2; margin: 0pt 0px;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">RewriteMap map.legacy dbm:/etc/httpd/conf/we-retail.map</span></div>
<div dir="ltr" style="line-height: 1.2; margin: 0pt 0px;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">RewriteCond ${map.legacy:$1} !=""</span></div>
<div dir="ltr" style="line-height: 1.2; margin: 0pt 0px;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">RewriteRule ^(.*)$ ${map.legacy:$1|/} [L,R=301,NE]</span></div>
</td></tr>
</tbody></table>
</div>
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">If you are managing multiple sites, in every domain redirect.rules file you need to change the /etc/httpd/conf/we-retail.map file to the corresponding domain map file.</span></span><br />
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">3. </span></span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">How to set cron expression to execute the above script on an hourly basis.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">To open the cron file run the command:</span><br />
<div align="left" dir="ltr" style="margin-left: 36pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="182"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">sudo crontab -e</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Or</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">sudo /bin/crontab -e</span></div>
</td></tr>
</tbody></table>
</div>
<span style="font-family: "arial"; font-size: 11pt; text-indent: 36pt; white-space: pre-wrap;">A file gets opened and you can add your cron expression like shown below.I have set the cron expression on hourly basis.</span><span style="background-color: white; text-indent: 36pt;"> </span><br />
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; table-layout: fixed; width: 468pt;"><colgroup><col></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">0 * * * * sh /etc/httpd/conf.d/redirects/redirect-map.txt 2>&1 /var/log/httpd/map-update-cron.log</span></div>
</td></tr>
</tbody></table>
</div>
<span id="docs-internal-guid-106998a7-7fff-5f2d-525a-6bcdf20c4648">
</span>
<br />
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-106998a7-7fff-5f2d-525a-6bcdf20c4648"><br /></span></div>
<span id="docs-internal-guid-106998a7-7fff-5f2d-525a-6bcdf20c4648">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="47" src="https://lh3.googleusercontent.com/FvX5W28OBsdUkY-Q1kx6ZavASN702IviZYhxvGIf610lz9fZhxawHJx3A4Q0UxXJLG3dJr21k40mCK4s11dama92uVoM7OSqdSJjJvZjtzsMljZ9TAIz7IimSkQYU01tJtZgx15o" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig: Screenshot for the cron expression in apache</b></td></tr>
</tbody></table>
</span><br />
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-106998a7-7fff-5f2d-525a-6bcdf20c4648"><span style="background-color: transparent; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">When you do all the configuration, you need to manually run the bash script one time by running the command “</span><span style="background-color: transparent; font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">sh redirect-map.txt”</span></span></div>
<span id="docs-internal-guid-106998a7-7fff-5f2d-525a-6bcdf20c4648">
</span>
<br />
<div dir="ltr" style="background-color: white; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-106998a7-7fff-5f2d-525a-6bcdf20c4648"><span style="background-color: transparent;"><span style="font-family: "arial";"><span style="font-size: 11pt; white-space: pre-wrap;">Because the rewrite rule try to fetch map file which doesn’t gets created by then, may be your cron job will create it in an hour. So run one time manually to restart the </span><span style="font-size: 14.6667px; white-space: pre-wrap;">Apache</span><span style="font-size: 11pt; white-space: pre-wrap;"> server and later cron job can take care of this activity on an interval.</span></span></span></span><br />
<span style="background-color: white;"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span>
<span style="background-color: white;"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Vanity URL Issue</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">: </span></span><span style="background-color: transparent; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">As you know that vanity URL’s can not be duplicated within the whole AEM. AEM can only have one unique vanity and in the case of Multiple sites, we may have requirements of having the same vanity for two domains. In this case also in place of vanity, you can manage this in 301 redirect map file for both domains and as every website map file is different so there won't be any conflict.</span><br />
<span style="font-family: arial; font-size: 11pt; font-weight: 700; white-space: pre-wrap;"><br /></span>
<span style="font-family: arial; font-size: 11pt; font-weight: 700; white-space: pre-wrap;">Limitations of 301 Redirects in Redirect Map Manager:</span></div>
<span id="docs-internal-guid-106998a7-7fff-5f2d-525a-6bcdf20c4648">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">301 Redirect Map is really a cool feature but it has some limitations.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 11pt; white-space: pre-wrap;">1. This is one to one mapping and we can not manage a regex here. So if we have 1000 of URL’s need to redirect in a particular pattern you can not manage in Redirect Map. For this, you have to manage it in </span><span style="font-size: 14.6667px; white-space: pre-wrap;">Apache</span><span style="font-size: 11pt; white-space: pre-wrap;"> level.</span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">So create a file and add all the regex redirect URL’s like shown below.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-5d8c8bea-7fff-e6b5-2f77-cc687bd79394"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>RewriteRule ^/en/index(.*)html$ /en/home.html [R=301,L]</b></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">Include the file in the rewrite file of a particular website.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Note</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: All the directories I mentioned above are as per AMS Servers directory structure. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If you </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">have different folder structure you can manage as per your need.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Note</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: Redirect Map Manager is not an AEM Feature but an ACS Commons feature. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">So you need to install ACS Commons package in your AEM Server.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-1ccaddba-7fff-432b-7542-ef0dadf93303"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Note</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: When you made any change in Apache configuration, don’t directly restart. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Run a command “</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">httpd-t</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">” to check all the syntax first. If “Syntax Ok” then </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">only restart otherwise the Apache will go down if the syntax is not OK.</span></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<span id="docs-internal-guid-47b2071a-7fff-aa41-b681-caf174059765"></span><br />
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="465"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">shivani@dispatcher2apsoutheast1:~ httpd -t</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Syntax OK</span></div>
</td></tr>
</tbody></table>
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Conclusion and Benefits of Using Redirect Map Manager</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">: </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: arial; font-size: 11pt; white-space: pre-wrap;">1. If you are managing 301 redirects like this, you don't need to manage 301 redirects at the page properties level. If there is any page in AEM, which you want to redirect just configure the page in the redirect Map Manager.</span></div>
<span id="docs-internal-guid-47b2071a-7fff-aa41-b681-caf174059765"><span id="docs-internal-guid-696b0ab5-7fff-ecb8-1786-221d73746e93">
</span></span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-47b2071a-7fff-aa41-b681-caf174059765"><span id="docs-internal-guid-696b0ab5-7fff-ecb8-1786-221d73746e93"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">2. Through this approach you can give an author the privilege that if they miss out any 301 redirection, they can do it anytime they want.</span></span></span></div>
<span id="docs-internal-guid-47b2071a-7fff-aa41-b681-caf174059765"><span id="docs-internal-guid-696b0ab5-7fff-ecb8-1786-221d73746e93">
</span></span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-47b2071a-7fff-aa41-b681-caf174059765"><span id="docs-internal-guid-696b0ab5-7fff-ecb8-1786-221d73746e93"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">3. If there are many vanity URL’s and because so many vanity URL’s impact the performance of the server, you can use 301 redirection in place of vanities.</span></span></span></div>
<span id="docs-internal-guid-47b2071a-7fff-aa41-b681-caf174059765"><span id="docs-internal-guid-696b0ab5-7fff-ecb8-1786-221d73746e93">
</span></span>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-47b2071a-7fff-aa41-b681-caf174059765"><span id="docs-internal-guid-696b0ab5-7fff-ecb8-1786-221d73746e93"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">4. You can use same vanities for different domains sharing the same AEM Server.</span></span></span><br />
<span id="docs-internal-guid-47b2071a-7fff-aa41-b681-caf174059765"><span id="docs-internal-guid-696b0ab5-7fff-ecb8-1786-221d73746e93"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
</span></span><br />
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-47b2071a-7fff-aa41-b681-caf174059765"><span id="docs-internal-guid-696b0ab5-7fff-ecb8-1786-221d73746e93"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-b0cb006b-7fff-2706-46da-a320dbc24e8e"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><b>Hope it will help you guys !!</b></span></span></span></span></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-47b2071a-7fff-aa41-b681-caf174059765"><span id="docs-internal-guid-696b0ab5-7fff-ecb8-1786-221d73746e93"><b style="font-family: arial; font-size: 11pt; white-space: pre-wrap;">Thanks and Happy Learning.</b></span></span></div>
</div>
<span id="docs-internal-guid-47b2071a-7fff-aa41-b681-caf174059765"><span id="docs-internal-guid-696b0ab5-7fff-ecb8-1786-221d73746e93">
</span></span></div>
</span><span id="docs-internal-guid-2ff13e88-7fff-fd3f-9078-ed27c512af65">
</span></div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com4tag:blogger.com,1999:blog-7481371294519000730.post-47895378679330834402020-01-04T10:03:00.002+05:302020-01-06T08:00:36.703+05:30How to manage certificates in AEM Truststore<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_6l-ySPqb3hBDSBUOMWkxaXjku3UW8GTtv3952mmnxgI7nx0uMRpFGu31mxmDzrVzcJu-filEeXG_jD0wx-dOKSZ7qWP3znBE4LBp_VRXnEQqHBBf8xocUS1snTJqY9NbfPVjLTxuG9Q6/s1600/Picture1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_6l-ySPqb3hBDSBUOMWkxaXjku3UW8GTtv3952mmnxgI7nx0uMRpFGu31mxmDzrVzcJu-filEeXG_jD0wx-dOKSZ7qWP3znBE4LBp_VRXnEQqHBBf8xocUS1snTJqY9NbfPVjLTxuG9Q6/s320/Picture1.png" style="display: none;" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;">Hello Everyone,</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;">In this blog, we will talk about what is Truststore, how to manage certificates in AEM </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;">Truststore </span><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">and challenges </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">we face while managing the certificates in publish server.</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">What is Truststore: </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">TrustStore is used in context of setting up SSL connection in Java application </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">between </span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">client </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">and server. In SSL handshake, purpose of trustStore is to verify credentials.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">The public key certificates </span><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">provided </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">by CA authorities </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">for encrypting the content are</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">also be stored </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">in the TrustStore.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">TrustStore </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">stores public key or certificates from CA (Certificate Authorities) which is </span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">used to trust remote </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">party or SSL connection.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">How to manage these certificates in AEM and how to fetch the public key from </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">that certificate in your AEM Code.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">1.Go to AEM-> Tools->Security->TrustStore.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">2. Go to </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Add Certificates from CER File</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Section and </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Select Certificate File</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> to Upload and click on Submit.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-970dc41d-7fff-d696-c47d-2b85371a958a"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="231" src="https://lh6.googleusercontent.com/U1iVrcHtQUg4whww3PqSSDeDmlkpC9IlL9k1bSz2zPTZeAf01t72uPNe-PS1QdtEKsjcjAe0hEmHXwirXMb8Vha9ELzowAmXLcLXxm5OA-xOVdG2J1BqLwGQh20ardQltqhm96Ds" style="font-family: arial; font-size: 11pt; margin-left: auto; margin-right: auto; margin-top: 0px; white-space: pre-wrap;" width="624" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig1: AEM Truststore Console to Upload Certificates</b></td></tr>
</tbody></table>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">3. Every certificate will generate a unique </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Alias </span><b><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;">N</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;">ame(</span></b><span style="background-color: white; color: #323232; font-family: , "helvetica" , "arial" , sans-serif; font-size: 13px;">certalias___1577961678433 for the above certificate</span><b><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">)</span></b><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">The above uploaded certificates gets stored in "<b>/etc/truststore"</b> in CRX:</span></div>
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="206" src="https://lh5.googleusercontent.com/uenjuf-MNL7Yx1c2MBAcr232V8_jEvCrZtEPiFoUuCR8MI2As7yghPoI1dwrqCq4Zor1UF-eUDThWCMR_5LfFS6V_vJjyLroav94qS5M9Rz2rq6szIb6yv8da30D_DiAluPaU5p5" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="361" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig2: Certificates get Stored in CRX</b></td></tr>
</tbody></table>
</div>
<div>
<span id="docs-internal-guid-8ed9f9a6-7fff-7a5f-3279-537782eef669"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">How to fetch the public key from the certificate using Alias Name:</span></div>
</div>
<div>
<script src="https://gist.github.com/gargshivani111/c7c9d0e8732b61b49ca5e0ab371134b5.js"></script>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-8ed9f9a6-7fff-7a5f-3279-537782eef669"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-72073d30-7fff-de97-ca76-49639ef4cd2f" style="font-weight: normal;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">Note</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">: To fetch the certificate public key from alias, you must have an OSGI config for Alias.Ideally you should upload all certificates in author and replicate /etc/truststore path to all the publishers to maintain same alias for all the servers sitting on the same environment.</span></span></span></span><br />
<span id="docs-internal-guid-8ed9f9a6-7fff-7a5f-3279-537782eef669"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">If we upload certificates in publishers without replication, the publisher may generate different alias Id and if two publishers of same environment generate different alias then to maintain the different OSGi configurations for both publishers is not possible.So always upload in author and replicate it all the publishers.</span></span><br />
<span id="docs-internal-guid-8ed9f9a6-7fff-7a5f-3279-537782eef669"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
</span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-8ed9f9a6-7fff-7a5f-3279-537782eef669"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Note</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">:</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">If you have few certificates in author and some of them you don’t want in publish server, </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">in AEM there is no way that you can replicate only one certificate but not another but if you </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">really don't want some certificates in publish, then you replicate first all certificates and go </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">to publish server and delete the unwanted one .[</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Recommended by adobe</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">]</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-8ed9f9a6-7fff-7a5f-3279-537782eef669"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-8ed9f9a6-7fff-7a5f-3279-537782eef669"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Note</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">: Don’t ever pass the anonymous resourceResolver in KeyStoreService API because to access the certificates in publish, you need to give /etc/truststore an anonymous access and you should be very aware about anonymous access in publish servers. So always get resourceResolver from System User. There is an OOTB Service user named “</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">truststore-reader-service</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">” available for fetching the trustore values in publish server.</span></span></div>
</div>
<span id="docs-internal-guid-8ed9f9a6-7fff-7a5f-3279-537782eef669"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-72073d30-7fff-de97-ca76-49639ef4cd2f" style="font-weight: normal;"><span id="docs-internal-guid-7e52be17-7fff-e721-8dd8-da966415d5f1"></span></span></span><br /></span>
<br />
<div>
<div dir="ltr" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-b0cb006b-7fff-2706-46da-a320dbc24e8e"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><b>Hope it will help you guys !!</b></span></span></span></div>
<div dir="ltr" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<b style="font-family: arial; font-size: 11pt; white-space: pre-wrap;">Thanks and Happy Learning.</b></div>
</div>
<br /></div>
<span id="docs-internal-guid-8ed9f9a6-7fff-7a5f-3279-537782eef669">
</span></div>
<span id="docs-internal-guid-5ac77ae6-7fff-7e69-a071-8dae676ad4b3"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span></div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com3tag:blogger.com,1999:blog-7481371294519000730.post-69145893896431342092019-12-29T20:01:00.000+05:302020-09-15T11:48:46.265+05:30CryptoSupport in AEM 6.5<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Hello Everyone,</span></div>
<b id="docs-internal-guid-180f8e7c-7fff-d2b0-1f5c-33e410136188" style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">While working with AEM, The information related to an API like endpoint,username and </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">password used to be maintained in OSGi Configurations.</span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Sometimes these API’s are really secure and the client don’t want the password to be seen </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">by anyone. OSGi Configurations are always part of the code.Even in some cases, clients </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">don’t </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">want to share the password even with developer, they want to use an encryption methodology </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">so that they can share the encrypted code with the developer and the code can be decrypted only at run time and nobody can not know about it.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">AEM provides us that kind of cryptosupport which can really make things really confidential </span></div>
<div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">and secure.</span></div>
<div>
<ul style="text-align: left;">
<li><span style="background-color: transparent; font-size: 14.6667px; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial";">There is <a href="http://localhost:4502/system/console/crypto" target="_blank">Crypto console</a> in AEM, through which clients can generate the encryption code without even sharing the plain text with the developer.</span></span><span id="docs-internal-guid-2910a972-7fff-8bd5-e056-393a7a983d9f"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="border: none; display: inline-block; height: 206px; overflow: hidden; width: 501px;"><img height="206" src="https://lh5.googleusercontent.com/VnAtJsNcvk0MKgCfVFxGnKPgYr1Ve1Dnb_mkKoy3jCeLpk97XsZhwnOLE1q2DVCXWYSK1IbJKDc0L_Tef6ySMotE0G_GKqZ4pDg_Of1XX6ikmRNgN0pfrVdJT0Nc0byRKybnvDVu" style="margin-left: 0px; margin-top: 0px;" width="501" /></span></span></span><span id="docs-internal-guid-d62953c5-7fff-12ac-f1ff-05b2a4defa71"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span></li>
<li><span id="docs-internal-guid-9587c69d-7fff-aa92-6eef-6af419c0931a"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">They can just share the encryption key and developer can put it in codebase as OSGi Configuration. There is no console in AEM, from where the encrypted code can be decrypted into plain text.</span></span></li>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><span id="docs-internal-guid-27ae05ad-7fff-d835-cc02-21b898bb8c45"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">Every instance hmac/master key is different and if the developer knows the encrypted key they can’t get to know the plain text by any way.In other words, the encrypted key will be unique for each and every servers.</span></span></span></span></li>
</ul>
<span id="docs-internal-guid-7c86aa74-7fff-04ab-afc8-3eff3426eb89"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-7c86aa74-7fff-04ab-afc8-3eff3426eb89"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">So how to use CryptoSupport in AEM?</span></span></div>
<span id="docs-internal-guid-7c86aa74-7fff-04ab-afc8-3eff3426eb89">
</span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-7c86aa74-7fff-04ab-afc8-3eff3426eb89"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">1.Go to </span><a href="http://localhost:4502/system/console/crypto" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Crypto Support</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> using felix console in AEM and type your password/any sensitive information in plain text field and click on Protect to encrypt this.</span></span></div>
<span id="docs-internal-guid-7c86aa74-7fff-04ab-afc8-3eff3426eb89">
</span>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-7c86aa74-7fff-04ab-afc8-3eff3426eb89"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">2.</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">The code to decrypt the key is below:</span></span></div>
<span id="docs-internal-guid-7c86aa74-7fff-04ab-afc8-3eff3426eb89"><span id="docs-internal-guid-c84a2015-7fff-e577-7064-9905400026ea"><div align="left" dir="ltr" style="margin-left: 36pt;">
<div align="left" dir="ltr" style="margin-left: 36pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="325"></col></colgroup><tbody>
<tr style="height: 104.25pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">@Reference</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">CryptoSupport cryptosupport;</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<b id="docs-internal-guid-b2ba9fcc-7fff-ce7f-f7a2-10062f34dfa4" style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Public getDecryptedKey(int encryptedKey)</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">{</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">if(this.cryptoSupport.isProtected(key){</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">this.cryptoSupport.unprotect(key)</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
</div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}}</span></div>
</td></tr>
</tbody></table>
</div>
<span id="docs-internal-guid-8b3519e5-7fff-49d0-d3e3-653bba0f5c51">
</span></div>
</span></span><span id="docs-internal-guid-522c84e3-7fff-b1d6-821b-e63938c2bb7d"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b><br /></b></span>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>Note: No Need to write decryption logic for "password Type" fields.In the Password Type fields, AEM will take care of decryption part by itself.</b></span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b><br /></b></span>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Now the major concern of using this encryption method come up with production servers. As i mentioned previously that every instance is unique and generate a different encrypted key. But ideally the production server might have two publishers and we can't create configuration based on individual publisher. So the ideal scenario is, we want to use the same key for all authors and publishers belong to one environment.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">So ideally all the servers related to one environment irrespective of author/publishers must be sharing the same key.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
</span><span id="docs-internal-guid-347e3fdf-7fff-5b67-baee-f432c5d7841d"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>How to do that?</b></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Before AEM 6.2, you can see the “hmac” and master files directly in AEM CRX, but due to security concerns, these keys have been removed from crx and moved inside the bundle.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">1. Go to the author instance and see the bundle id of “Adobe Granite Crypto Bundle Key Provider (</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">com.adobe.granite.crypto.file</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">)”, usually it is bundle No 25 , then go to crx-quickstart/launchpad/felix/bundle25/data. There are two files sitting in data which are hmac and master. Copy the files and replace them with the files sitting in publishing servers under the same path.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">2. </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Restart the AEM server or you can restart the bundle </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Adobe Granite Crypto Support</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> (com.adobe.granite.crypto). I always prefer restarting the server because it takes lesser time than restarting the Crypto Support Bundle ( this also do a kind of restart for all bundles and takes time).</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>How to validate the keys:</b></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">You can run a command in terminal “</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">md5sum hmac</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">” under the data folder and can help to match the key with all the servers to validate if the same key exists for all the servers.</span><img height="76" src="https://lh4.googleusercontent.com/tgmNHCEYRiH_d6ZLyNytjfF0DOoOq44TH7HxBWD3YjQ7GUcIUbnF48TYeonBavPZH2mlpfRQs6PU6kj6jMelFJe5zFPVmw6HSv9l7q6XTbUBjbWfFpS38iN3F7uRgkODuMvi-uw6" style="font-family: Arial; font-size: 11pt; margin-left: 0px; margin-top: 0px; white-space: pre-wrap;" width="613" /></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Note</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">: Initially to validate the keys, I was trying to generate the encrypted code from author and publisher and trying to match them, to validate if they are sharing the same hmac and master files But when you enter the same text on an AEM server and try to generate the encrypted code again and again, the server generates the different encryption code in every attempt. So you need not worry about it, encrypt the plain text once and put in the configurations. AEM will take care of decryption part.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">When you put the encrypted key in the OSGI configuration, the encrypted key is always having curly brackets in start and end.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">So if you put a config like :</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-59e6dccc-7fff-02b0-def0-84daa4ea05a9"><span style="font-family: "arial"; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><b>getPassword="{590ea2a50e2cffcc5800a80ade1623fd96d4fa3ed28f157344f29bc636e49a55}"/></b></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">You won’t be able to deploy configuration because curly brackets are always used to mention data type in OSGI Config like {boolean} true,so always mention the data type of config for encrypted keys.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-b8838bbd-7fff-8028-abd2-21252459d1e2"><span style="font-family: "arial"; font-size: 9pt; vertical-align: baseline; white-space: pre-wrap;"><b>getPassword="{String}{590ea2a50e2cffcc5800a80ade1623fd96d4fa3ed28f157344f29bc636e49a55}"/></b></span></span></div>
</span><span id="docs-internal-guid-a17aa7d1-7fff-b367-dd3a-9f05d0c9ee21"><div align="left" dir="ltr" style="margin-left: 36pt;">
<br /></div>
<div>
<div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; white-space: normal;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-b0cb006b-7fff-2706-46da-a320dbc24e8e"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><b>Hope it will help you guys !!</b></span></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-b0cb006b-7fff-2706-46da-a320dbc24e8e"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><b>Thanks and Happy Learning.</b></span></span></span></div>
<div>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-b0cb006b-7fff-2706-46da-a320dbc24e8e"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><b><br /></b></span></span></span></div>
</div>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-b0cb006b-7fff-2706-46da-a320dbc24e8e"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">
<span style="background-color: white; color: #222222; font-size: 13.2px;"></span></span></span></span></div>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-b0cb006b-7fff-2706-46da-a320dbc24e8e">
</span></span></div>
</span></div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com12tag:blogger.com,1999:blog-7481371294519000730.post-49711775535672075482019-12-12T20:08:00.002+05:302020-01-05T12:25:41.783+05:30AEM Logs in Detail Part-2<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="margin-left: -5.4pt;">
<div dir="ltr" style="margin-left: 12.6pt;">
<div dir="ltr" style="margin-left: 0pt;">
<div dir="ltr" style="margin-left: 2.25pt;">
<div dir="ltr" style="margin-left: 2.85pt;">
<div style="text-align: left;">
<div dir="ltr" style="margin-left: 0pt;">
<div style="text-align: left;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<div style="text-align: left;">
<span id="docs-internal-guid-b84bfb0d-7fff-f72a-0332-fe8c89abb357"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span id="docs-internal-guid-33c94a2b-7fff-6879-86be-d088bd11f74f"></span><br />
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Hi everyone,</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">It’s been quite a long time since I published </span><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="http://www.sgaemsolutions.com/2017/04/aem-logs-in-detail-part-1.html" style="text-decoration: none;">Part-1 for AEM Logs in Detail.</a> </span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">In the previous blog,I have already discussed all the logs provided by AEM.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">But AEM provided logs are not sufficient for us sometimes. We want separate </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">logs for our application, so that it will be easy to debug our code.</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">So In the blog we will discuss how to create custom loggers in AEM.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-87e0a301-7fff-fae7-022e-d1a5cd24a668"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">1. Go to</span><a href="http://localhost:4502/system/console/configMgr" style="text-decoration-line: none;"><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> felix console configMgr</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">.</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">2. Go to Apache Sling Logging Logger Configuration.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">3. </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Click on + to Add a new configuration.</span><img alt="logging logger.PNG" height="306.600566572238" src="https://lh3.googleusercontent.com/0WXNqBKrTjt4HXPnU243QqzWlzA53NziFbLH2SoKTXy3J26W9KMGcmNjzfv-qyRwSjgzXn8LxJ-IqceXlraVe2qLuC2Ugi2EbxkGnePeYWPsKb4DaYaGYxlU3z3H6vqpzMOisrPz" style="font-family: Arial; font-size: 11pt; margin-left: 0px; margin-top: 0px; white-space: pre-wrap;" width="474" /></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div dir="ltr" style="margin-left: -5.4pt;">
<div dir="ltr" style="margin-left: 12.6pt;">
<div dir="ltr" style="margin-left: 0pt;">
<div dir="ltr" style="margin-left: 2.25pt;">
<div dir="ltr" style="margin-left: 2.85pt;">
<div style="text-align: left;">
<div dir="ltr" style="margin-left: 0pt;">
<div style="text-align: left;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div dir="ltr" style="margin-left: -5.4pt;">
<div dir="ltr" style="margin-left: 12.6pt;">
<div dir="ltr" style="margin-left: 0pt;">
<div dir="ltr" style="margin-left: 2.25pt;">
<div dir="ltr" style="margin-left: 2.85pt;">
<div style="text-align: left;">
<div dir="ltr" style="margin-left: 0pt;">
<div style="text-align: left;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<ul>
<li><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Log level</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">: The log level defines which type of logs you want to have in your custom log file for ex: trace,debug,info,warn,error.</span></li>
<li><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Log File</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">:Here you can identify the name of the log file,which needs to be created under the logs folder.</span></li>
<li><span style="font-size: 14.6667px; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial";"><b>Message Pattern</b>:The java.util.MessageFormat pattern to use for formatting log messages with the root logger. This is a java.util.MessageFormat pattern supporting up to six arguments: </span></span><span style="font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">
</span></li>
<ul>
<li><span style="font-size: 14.6667px; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial";"><span id="docs-internal-guid-2411763a-7fff-85c3-8c33-247c8de26a85"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">{0} The timestamp of type java.util.Date, </span></span></span></span></li>
<li><span style="font-size: 14.6667px; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial";"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-ab62e2dc-7fff-b749-2eb4-c29e73a743cf"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">{1} the log marker,</span></span></span></span></span></li>
<li><span style="font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-family: "arial";"><span style="font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-size: 14.6667px; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">{2} the name of the current thread, </span></span></span></span></li>
<li><span id="docs-internal-guid-664131d4-7fff-20a9-e10b-b1adaaec5709"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">{3} the name of the logger, </span></span></li>
<li><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">{4} the log level and</span></li>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">{5} the actual log message. </span></span></li>
</ul>
<div>
<span style="font-family: "arial";"></span><br />
<div>
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">If the log call includes a Throwable, the stacktrace is just appended to the message regardless of the pattern.</span></span></div>
<span style="font-family: "arial";">
</span></div>
<div>
<span style="font-family: arial; font-size: 14.6667px; white-space: pre-wrap;">The Pattern can be like this: {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* {2} {3} {5}</span></div>
<li><span style="font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b>Logger</b>: Here we define the package name of the application,for which we want to print the logs.You can add multiple packages also.</span></span></span></li>
<li><b style="font-family: Arial; font-size: 14.6667px; white-space: pre-wrap;">Additivity</b><span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">: If set to false then logs from these loggers would not be sent to any appender attached higher in the hierarchy.</span></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div dir="ltr" style="margin-left: -5.4pt;">
<div dir="ltr" style="margin-left: 12.6pt;">
<div dir="ltr" style="margin-left: 0pt;">
<div dir="ltr" style="margin-left: 2.25pt;">
<div dir="ltr" style="margin-left: 2.85pt;">
<div style="text-align: left;">
<div dir="ltr" style="margin-left: 0pt;">
<div style="text-align: left;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">Let's suppose we have one logging configuration for package “com.sgaem.* “and we have created one more logger for “com.sgaem.servlet.TestServlet”, so by default the TestServlet loggers will not get printed in com.sgaem.* logger file but if you enable the additivity then the loggers will go in both log files</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">4.</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Go to Apache Sling Logging Writer Configuration.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">5.</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Click on + to Add a new configuration.</span><img height="194" src="https://lh4.googleusercontent.com/x1VotP2zRA95Ut4r-vhPwNjv85uHAssM1iAEl-Mr0dZN9uSLHFyqUsm0RWuCJ7XaA5zXATgih4KOXbkBlw70rYBo6PLO7tkRa-73ZsqCrztEyz3hgpvIUsyHWIu2ZQBEqkx2wwYN" style="font-family: Arial; font-size: 11pt; margin-left: 0px; margin-top: 0px; white-space: pre-wrap;" width="490" /></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<ul>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b>Log File: </b>Here you define the log file Name for which you want to write a logging writer.<b>
</b></span></span></li>
<li><span id="docs-internal-guid-960cbadc-7fff-35e5-7d55-a3144df0c994"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Number of Log Files</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">:Here you can define how many logs file you want to maintain for the specific Log File defined above.</span></span></li>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b>Log File Threshold</b>: Defines how the log file is rotated (by schedule or by size) and when to rotate.Meaning you can define if you want to rotate the log file on daily,weekly or monthly basis or on the basis of size.</span></span></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div dir="ltr" style="margin-left: -5.4pt;">
<div dir="ltr" style="margin-left: 12.6pt;">
<div dir="ltr" style="margin-left: 0pt;">
<div dir="ltr" style="margin-left: 2.25pt;">
<div dir="ltr" style="margin-left: 2.85pt;">
<div style="text-align: left;">
<div dir="ltr" style="margin-left: 0pt;">
<div style="text-align: left;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"></span><br />
<h4 dir="ltr" style="background-color: white; line-height: 1.35; margin-bottom: 9pt; margin-top: 0pt; text-align: center;">
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><i><u>Log File Rotation</u></i></span></span></span></h4>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb">
</span>
<br />
<div>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Log files can grow rather quickly and fill up available disk space. To cope with this growth log files may be rotated in two ways: At specific times or when the log file reaches a configurable size. The first method is called Scheduled Rotation and is used by specifying a SimpleDateFormat pattern as the log file "size". The second method is called Size Rotation and is used by setting a maximum file size as the log file size.</span></span></div>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb">
</span>
<br />
<div>
<br /></div>
<div>
<h5 dir="ltr" style="background-color: white; line-height: 1.3499999999999999; margin-bottom: 0pt; margin-top: 0pt; padding: 0pt 0pt 9pt 0pt;">
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb">
<span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">Scheduled Rotation</span><span style="font-size: 14.6667px; font-weight: 400; white-space: pre-wrap;">:The rolling schedule is specified by setting the org.apache.sling.commons.log.file.size property to a java.text.SimpleDateFormat pattern. It is possible to specify monthly, weekly, half-daily, daily, hourly, or minutely rollover schedules.Check this section to see available <a href="https://sling.apache.org/documentation/development/logging.html#scheduled-rotation" target="_blank">Scheduled Rotation</a>.
Do not use the colon ":" character anywhere in the pattern option. The text before the colon is interpreted as the protocol specification of a URL which is probably not what you want.</span></span></span></span></h5>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a">
</span></span></div>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb">
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div dir="ltr" style="margin-left: -5.4pt;">
<div dir="ltr" style="margin-left: 12.6pt;">
<div dir="ltr" style="margin-left: 0pt;">
<div dir="ltr" style="margin-left: 2.25pt;">
<div dir="ltr" style="margin-left: 2.85pt;">
<div style="text-align: left;">
<div dir="ltr" style="margin-left: 0pt;">
<div style="text-align: left;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"></span></span></span></span><br />
<div style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; padding: 0pt 0pt 9pt; text-align: left;">
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span id="docs-internal-guid-cd1ea5f9-7fff-b799-c1b5-a9542f80fcb4" style="font-family: "arial"; white-space: pre-wrap;"><span style="background-color: transparent; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><b>Size Rotation</b>:Log file rotation by size is specified by setting the org.apache.sling.commons.log.file.size property to a plain number or a number plus a size multiplier. The size multiplier may be any of K, KB, M, MB, G, or GB where the case is ignored and the meaning is probably obvious.</span></span></span></span></span></span></div>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331">
</span></span></span></span>
<br />
<div style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; padding: 0pt 0pt 9pt; text-align: left;">
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span style="background-color: transparent; font-size: 14.6667px; white-space: pre-wrap;"><span style="font-family: "arial";"><u><b>Important to Know</b>: </u></span></span></span></span></span></span><br />
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span style="background-color: transparent; font-size: 14.6667px; white-space: pre-wrap;"><span style="font-family: "arial";"><br /></span></span>
<span style="background-color: transparent; font-size: 14.6667px; white-space: pre-wrap;"><span style="font-family: "arial";"><b> Apache Sling Logging logger Configuration</b> is self sufficient to print the log then the </span></span><span style="background-color: transparent; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">question can come in your mind, what is the need of <b>Apache Sling Logging Writer Configuration</b>.</span></span></span></span></span></div>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331">
</span></span></span></span>
<br />
<div style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; padding: 0pt 0pt 9pt; text-align: left;">
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span style="background-color: transparent; font-size: 14.6667px; white-space: pre-wrap;"><span style="font-family: "arial";">There is one more configuration in AEM, which is <b>Apache Sling Logging Configuration</b> which </span></span><span style="background-color: transparent; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">can be considered a global configuration for all log files.</span><span style="background-color: transparent; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">Here you define a few things like Number of Log Files,Log File Threshold,Message Pattern etc.</span></span></span></span></span></div>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331">
</span></span></span></span>
<div style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; padding: 0pt 0pt 9pt; text-align: left;">
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span style="background-color: transparent; font-size: 14.6667px; white-space: pre-wrap;"><span style="font-family: "arial";">If you don’t override your values in your application related Logging Logger and Writer Configuration, it will take the value from Global.So if you don't define writer configuration it will take Number of Log Files and Threshold Message from global configuration.</span></span></span></span></span></span><br />
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span style="background-color: transparent; font-size: 14.6667px; white-space: pre-wrap;"><span style="font-family: "arial";"><br /></span></span>
<span style="background-color: transparent; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><b>Conclusion</b>: if you really need any change in the two properties(Number of log files and Threshold Message) defined in the logging Writer then only create a writer configuration else no need.</span></span></span></span></span><br />
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span style="background-color: transparent; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><br /></span>
<span style="background-color: transparent; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><b>There are two ways to see the log files in AEM.</b></span></span></span></span></span><br />
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span style="background-color: transparent; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">1.Go to the felix console ->Sling-><a href="http://localhost:4502/system/console/slinglog#" target="_blank">Log Support</a>, and search for your log file. You can directly open the log file from here.</span></span></span></span></span><br />
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span style="background-color: transparent; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><span id="docs-internal-guid-caeac1b7-7fff-e501-7b06-a781aa166fca"><span style="background-color: transparent; font-family: "arial"; font-size: 11pt; vertical-align: baseline;"><span style="border: none; display: inline-block; height: 354px; overflow: hidden; width: 494px;"><img height="354" src="https://lh4.googleusercontent.com/lz5HcVP7BPK4luLbACT3NUOganY2v2a9-dwTITD4glPaKir1OdQuHvBaR4hlz3HH_ZcZBSghLoe1eFRlbBonmfwO4AIOIo1BDV6znPCOE-D4-Nr96_3dWOPwUWa8EPJmeWpLU3ME" style="margin-left: 0px; margin-top: 0px;" width="494" /></span></span></span></span></span></span></span></span><br />
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span style="background-color: transparent; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">2. The logs files also gets created under crx-quickstart/logs. You can open your log files and see the logs.</span></span></span></span></span><br />
<span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="background-color: transparent; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span style="background-color: transparent; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;"><b>Demonstration Video of Custom Logger in AEM:</b></span></span></span></span></span></div>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/GjCFU-wQ8og" width="560"></iframe>
<div style="font-family: Arial; white-space: pre-wrap;">
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; white-space: normal;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<b>Hope it will help you guys !!</b></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<b>Thanks and Happy Learning.</b></div>
</div>
</div>
</span></span></span></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div dir="ltr" style="margin-left: -5.4pt;">
<div dir="ltr" style="margin-left: 12.6pt;">
<div dir="ltr" style="margin-left: 0pt;">
<div dir="ltr" style="margin-left: 2.25pt;">
<div dir="ltr" style="margin-left: 2.85pt;">
<div style="text-align: left;">
<div dir="ltr" style="margin-left: 0pt;">
<div style="text-align: left;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"></span></span><br />
<div>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"></span></span></span></span><br />
<div>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-7b393887-7fff-115d-c8dd-f366ff5fa041"></span></span></span></span></span></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; padding: 0pt 0pt 0pt 36pt; text-indent: -36pt;">
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-7b393887-7fff-115d-c8dd-f366ff5fa041"><br /></span></span></span></span></span></span></div>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-7b393887-7fff-115d-c8dd-f366ff5fa041">
</span></span></span></span></span></span></div>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a"><span style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-3245c6ef-7fff-cdf6-96e2-143dab0d9331">
</span></span></span></span></div>
<span id="docs-internal-guid-5785bb96-7fff-db7d-b728-4ce0fd6656fb"><span id="docs-internal-guid-9c410b8b-7fff-b86c-9897-11b4f653a02a">
</span></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div dir="ltr" style="margin-left: -5.4pt;">
<div dir="ltr" style="margin-left: 12.6pt;">
<div dir="ltr" style="margin-left: 0pt;">
<div dir="ltr" style="margin-left: 2.25pt;">
<div dir="ltr" style="margin-left: 2.85pt;">
<div style="text-align: left;">
<div dir="ltr" style="margin-left: -5.4pt;">
<div dir="ltr" style="line-height: 1.2; margin-bottom: 12pt; margin-top: 0pt;">
<div dir="ltr" style="margin-left: 0pt;">
<div dir="ltr" style="margin-left: 0pt;">
<div dir="ltr" style="margin-left: 0pt;">
<div style="font-family: arial; font-size: 14.6667px; font-weight: 700; text-align: left; white-space: pre-wrap;">
</div>
<span id="docs-internal-guid-9b444bac-7fff-29de-9a2f-f76a32ec446d"><span id="docs-internal-guid-51f07004-7fff-8018-f9ba-afed8840bebc"><span style="text-align: center;">
</span></span></span></div>
<span id="docs-internal-guid-9b444bac-7fff-29de-9a2f-f76a32ec446d"><span id="docs-internal-guid-51f07004-7fff-8018-f9ba-afed8840bebc">
</span></span></div>
<span id="docs-internal-guid-9b444bac-7fff-29de-9a2f-f76a32ec446d">
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com1tag:blogger.com,1999:blog-7481371294519000730.post-19444229105201444222019-12-08T14:28:00.000+05:302019-12-08T14:51:29.444+05:30href=tel issue for international numbers in AEM RTE<div dir="ltr" style="text-align: left;" trbidi="on">
<span id="docs-internal-guid-57b4bcd2-7fff-947a-c711-e43061968edd"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Hello Everyone,</span></span><br />
<span id="docs-internal-guid-c5a13b3e-7fff-d2bc-ec0f-45c161c0aeab"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-a4e782e0-7fff-12a7-a637-be09da6ea8c2"><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">RTE is the most used component in AEM. There are always high expectations from this component, but the RTE component has some issues, which are actually not issues,but those features doesn't come with RTE basic behavior and we need to do something to make it work.</span></span><br />
<span><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: arial; font-size: 10pt; font-weight: 700; white-space: pre-wrap;">1. Handing Custom Protocols (tel:,callto:,emailto:) in Link Href in Rich Text Editor:</span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-b66eca5d-7fff-04ca-ad3f-c1655a41c2dc"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Problem Statement:</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> When you want to use a telephone number as a hyperlink and want to call </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">on the number by clicking on it, you need to use HTML like <a href="tel:1-847-555-5555"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">1-847-555-5555</a></span><span style="font-family: "arial"; font-size: 10pt; white-space: pre-wrap;">RTE is not able to render the same HTML as added in RTE.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Reason</span><span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;">:Adding protocols like tel: (or any custom) in anchor tag href attribute, may not be printed as entered in RTE as link checker com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl and XSS protection com.adobe.granite.xss.impl.HtmlToHtmlContentContext AntiSamy removes unrecognized protocols during component rendering.</span><span style="background-color: white; color: #666666; font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Solution</span><span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;">: To resolve this issue:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
</div>
<ol style="text-align: left;">
<li><span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;">Overlay /libs/cq/xssprotection/config.xml in /apps/cq/xssprotection/config.xml</span></li>
<li><span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;">Add the protocol say : <regexp name="telURL" value="tel:[0-9]+"/></span></li>
<li><span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;">Add telURL configuration to the accepted list of anchor href.</span></li>
<div align="left" dir="ltr" style="margin-left: 72pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="253"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-color: rgb(0, 0, 0); border-style: solid; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"><attribute name="href"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <regexp-list></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <regexp name="onsiteURL"/></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <regexp name="offsiteURL"/></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <regexp name="telURL"/></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> </regexp-list></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"></attribute></span></div>
</td></tr>
</tbody></table>
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr></tr>
</tbody></table>
<li><span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;">Go to “Day CQ Link Checker Service” and add “tel:” in special Link Prefixes”option.</span></li>
<div align="left" dir="ltr" style="margin-left: 72pt;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="291" src="https://lh5.googleusercontent.com/we9aN3Yd0UNSggJfysB7fuwHgKgNcH79RlG-oR0gVSeLq65ibUe_kcScQkdsZInICNqkjkCs91BERaecFBilrjYHiHxdqLxb0lrvT473eJNTrivInYdfkbyvR6HJ-7KMVGMvv6GN" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="460" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig1: Day CQ Link Checker Service</td></tr>
</tbody></table>
</ol>
<span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">2. </span><span id="docs-internal-guid-d351f36e-7fff-fa05-0981-e9a89addd42a"><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Handing International Numbers Link Href in Rich Text Editor :</span></span><div>
<span style="font-family: Arial;"><span style="font-size: 13.3333px; white-space: pre-wrap;"><b><br /></b></span></span><span id="docs-internal-guid-1b68779b-7fff-f584-c490-3b248ee4a2ac"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;">After doing the above mentioned steps,if I configure tel:12345 in rte it works fine, but when using </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;">href=tel for international numbers i.e., href=tel:+61.... AEM removes the link and it start stripping </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;">the code.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-f919eccc-7fff-9f8b-6b13-0ec1fa68e15d"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;">So need to follow the below step to make it work.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;">By default, the RTE supports these protocols in href:http://,https://,ftp://,mailto:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;">To configure an additional protocol, you will have to add the following structure in the RTE at </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;">the same level of the rtePlugins node, </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-faf5bf61-7fff-019a-00ee-d42970358ed0"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;">The definition of this node will be:</span></div>
<div>
<span id="docs-internal-guid-b024d7cb-7fff-4c31-3356-842b6e2bca5b"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #222222; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><htmlRules jcr:primaryType="nt:unstructured"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #222222; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><links</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #222222; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">jcr:primaryType="nt:unstructured"</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #222222; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">protocols="[http://,https://,ftp://,mailto:,tel:]" /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #222222; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"></htmlRules></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 10pt; white-space: pre-wrap;">And that's how the issue can be resolved.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 10pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #222222; font-family: Arial; font-size: 10pt; font-weight: 700; white-space: pre-wrap;">Hope it will help you guys !!</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: #222222; font-family: Arial; font-size: 10pt; font-weight: 700; white-space: pre-wrap;">Thanks and Happy Learning.</span></div>
</span></div>
</span><ol style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</ol>
</div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com4tag:blogger.com,1999:blog-7481371294519000730.post-11374930568210727842019-10-23T07:59:00.000+05:302019-10-23T08:04:24.752+05:30Component and Template level design dialogs in Template Editors in AEM<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2ejDRwFf0Kza6B439dJjXLnMpH7U_l6zDWgM2Zrg7vkbr5up8ThR5zZ_kMTVhiuYyVFMZUh4IHkbrfseWVOsui7y70_X8SXVlPRoveOomHySgxjNc6qLjaZBwKG6YAqmzMdR5r5oCTRgl/s1600/blog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2ejDRwFf0Kza6B439dJjXLnMpH7U_l6zDWgM2Zrg7vkbr5up8ThR5zZ_kMTVhiuYyVFMZUh4IHkbrfseWVOsui7y70_X8SXVlPRoveOomHySgxjNc6qLjaZBwKG6YAqmzMdR5r5oCTRgl/s320/blog.png" style="display: none;" /></a></div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Hello Everyone,</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Template Editors is a feature in AEM, which everybody is using right now. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Clients also find it quite exciting, when creation of templates are in their hands.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">But Template Editors create few myths in developers minds and I have seen people to </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">write code based on the basis of myths so I thought of clearing the doubts and wrote about it.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Design Dialog is one of the features which we are using since long and to fetch the value</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">of design dialog, we always use ${currentStyle.propertyName}.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-8652d616-7fff-3318-52e6-4e4d2bbdd2e5"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The concept of design dialog is if you want to share the values of a component across </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">all the pages created from a single template, we create design dialogs.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Myth</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">I have seen people saying that currentStyle doesn't work with dynamic templates so they </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">always </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">use the PolicyManager whether they really need it or not.Their idea is because previously design_dialog values gets stored in /etc/design/default.. ,currentStyle is only meant for that but because the design dialog value is now inside” /conf/projectName/policies/…” so to fetch the value from policies we need to use PolicyManager API like shown below.</span></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="445"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 10pt; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ContentPolicyManager policyManager = resourceResolver.adaptTo(ContentPolicyManager.class);</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 10pt; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> if (policyManager != null) {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 10pt; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> ContentPolicy contentPolicy = policyManager.getPolicy(resource);</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 10pt; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> if (contentPolicy != null) {</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 10pt; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> title= (String) contentPolicy.getProperties().get("title");</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 10pt; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 10pt; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> }</span></div>
</td></tr>
</tbody></table>
</div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">But this is not correct. currentStyle can also handle design_dialog values stored inside the </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">policies.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-500db22a-7fff-52f9-acc6-68f0a9ba1a67"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">But i just kept on thinking if ${currentstyle.propertyName} works fine for design dialogs then </span><span style="font-family: arial; font-size: 11pt; white-space: pre;">why so much big logic to do the same thing.</span></div>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">So the answer is i</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">n template editors, we have two kinds of design dialogs. </span><br />
<span id="docs-internal-guid-f4ab2093-7fff-69a4-bb71-965c20ddbdbc"><span id="docs-internal-guid-f5b60234-7fff-a399-2b7b-66f6413367f1">
</span></span>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-f4ab2093-7fff-69a4-bb71-965c20ddbdbc"><span id="docs-internal-guid-f5b60234-7fff-a399-2b7b-66f6413367f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-168c8498-7fff-dea5-41ba-0fbbabbcab64"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">Component Level</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">: Like any older version of AEM, we can create design dialogs in the components and fetch the value using currentStyle.I already talk about it </span><a href="http://www.sgaemsolutions.com/2017/09/dynamic-editable-templates-in-aem63.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-size: 11pt; vertical-align: baseline;">here</span></a><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">.</span></span></span></span></span></div>
<span id="docs-internal-guid-f4ab2093-7fff-69a4-bb71-965c20ddbdbc"><span id="docs-internal-guid-f5b60234-7fff-a399-2b7b-66f6413367f1">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-9cbd7e82-7fff-0aa4-a872-a98ff7c91440"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">Template Level</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">: Now you can manage the page level design dialog value also and to fetch that value you need to use the PolicyManager API. You just need to pass “currentPage.getContentResource”</span><span style="background-color: white; color: #242729; font-size: 10pt; vertical-align: baseline;"> </span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">as resource and you are able to fetch the value.</span></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><br /></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-814f5ee4-7fff-3f16-0894-b51ee46775bc"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">You can see the template level design values(</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">Page Policy</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">) from here:</span></span></span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="171" src="https://lh5.googleusercontent.com/JCEfjeOkT75Rrrg7oKSfUisGfRHJ4Ejr0pGMDMhpafQuRG7AkLuor61ocZJCMi0ZoC8lYlJS_KGVgftG2-tNfjTAdullL9w4yJZdW4Migy4VvaYKl5eZf4HXIrwqFBXhCFmJPr9s" style="font-size: 11pt; margin-left: auto; margin-right: auto; margin-top: 0px;" width="211" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig 1: Page Policy in a Template</b></td></tr>
</tbody></table>
<div>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: 11pt;"></span></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="202" src="https://lh5.googleusercontent.com/nz_w8Pg7EAcpz-dTYgYVDSuNqmIMuWR4WarZzDp76VCpALrpALU1_1L_VNtYygHCbg-HuPhF1_JqKcU3waasgSJhIRCv5z2c2Rsgj1I4y1v8yDII7d9nDWl-adcOIc8us6_hdF8i" style="font-family: Arial; font-size: 11pt; margin-left: auto; margin-right: auto; margin-top: 0px; white-space: pre-wrap;" width="505" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig 2: Design Dialog for a Template</b></td></tr>
</tbody></table>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: 11pt;">If you want to add a template policy then you add fields in design_dialog of page component and you will able to see the options here.</span></span></div>
<div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Because the above logic works well for both "<i>Component and Template Level </i></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><i>design dialog</i>", that's why developers like to create utility and use it for both.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>Demo Video to understand the concept better:</b></span></div>
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/Huwdw6xjwzw" width="560"></iframe>
<div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div>
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span id="docs-internal-guid-1a442727-7fff-09d6-c63a-f6f564456231"><span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Hope it will help you guys !!</span></span></span></span></span></span></span></span></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span></div>
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span id="docs-internal-guid-1a442727-7fff-09d6-c63a-f6f564456231"><span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Thanks and Happy Learning.</span></span></span></span></span></span></span></span></span></div>
</div>
<div>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
</span></span></div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com1tag:blogger.com,1999:blog-7481371294519000730.post-2964268968811999302019-10-20T18:58:00.001+05:302019-10-21T08:44:53.046+05:30Implementing Header and Footer with Editable Templates<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRXGmEQyVkVbCQ9cKmE6ps6AGh1xUabNerrTo2BtEmtAXc1Lz9GqT661n5E60ZSGqY8QTcLi3UgoJl2qGNA13T3Q1iKbsPO2rAHa289DVGIybL9SL9dGbJZIbN3mcHGFrV2g68_pdJenZh/s1600/Picture1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRXGmEQyVkVbCQ9cKmE6ps6AGh1xUabNerrTo2BtEmtAXc1Lz9GqT661n5E60ZSGqY8QTcLi3UgoJl2qGNA13T3Q1iKbsPO2rAHa289DVGIybL9SL9dGbJZIbN3mcHGFrV2g68_pdJenZh/s320/Picture1.png" style="display: none;" /></a></div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Hello Everyone,</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<b id="docs-internal-guid-0b5815f2-7fff-684d-91ec-31dfcdea898f" style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">I have already wrote a lot about editable templates, but a lot of people ask me about </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">what is the best way to manage header and footer in AEM with editable Templates.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">We-Retail project really mislead us about this concept as in that project, when we drag and </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">drop </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">header/footer, no need to configure anything. The header and footers itself got populated.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">But we never have that ideal use case in real life when we don't need to configure anything</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">in header and footer.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">As there is no inheritance between two templates so what can be best suited </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">implementation for header and footer.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-f10643c0-7fff-126e-a485-104e81f56a2d"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Solution 1</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Experience fragment is one of the ways to solve this issue as you can create an XF, one </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">for header and one for the footer and reference those using XF Component in the template </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">level then </span><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">all the </span><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">pages </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">will automatically get the value of header and footer created from that template.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>Pros and Cons of Using this approach:</b></span></div>
<span id="docs-internal-guid-f868fc12-7fff-f250-f44d-eba7cc83aae9"></span><br />
<ol style="margin-bottom: 0px; margin-top: 0px; text-align: left;"><span id="docs-internal-guid-f868fc12-7fff-f250-f44d-eba7cc83aae9">
<li><span id="docs-internal-guid-f868fc12-7fff-f250-f44d-eba7cc83aae9"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">In this approach, you need to drag and drop XF component in place of header and footer on each template and link it to corresponding XF.</span></span></li>
<li><span id="docs-internal-guid-f868fc12-7fff-f250-f44d-eba7cc83aae9"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">If you are using the same content for header and footer,you can put it in the structure of the initial template, then you don't need to drag and drop it in each template, but if you have multiple sites using same initial template,I won't recommend it as different sites may have different header and footer XF.</span></span></li>
<li><span id="docs-internal-guid-f868fc12-7fff-f250-f44d-eba7cc83aae9"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">If you are using XF, it is best to drag and drop and configure on each template individually.</span></span></li>
</span></ol>
<div>
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b>Demonstration Video of Implementing Header and Footer using XF in editable Templates:</b></span></span><br />
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/v4wYDIyUxqY" width="560"></iframe>
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-f868fc12-7fff-f250-f44d-eba7cc83aae9"><span id="docs-internal-guid-7cfe52cb-7fff-3fd0-ec59-28aac348d865"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Solution 2</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">: There is one more solution which I prefer the most and used in my two recent projects, It goes well in both cases static/dynamic templates.</span></span></span></div>
<span id="docs-internal-guid-f868fc12-7fff-f250-f44d-eba7cc83aae9"><span id="docs-internal-guid-7cfe52cb-7fff-3fd0-ec59-28aac348d865">
</span></span></div>
<span id="docs-internal-guid-f868fc12-7fff-f250-f44d-eba7cc83aae9">
</span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-bc88d731-7fff-7e01-29e0-957b4c1f2ae9"></span></div>
<ol style="margin-bottom: 0px; margin-top: 0px; text-align: left;">
<li><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Create a template (may be home-page template) for the root-page to configure header and footer of the site under which all the pages exist.and p</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">rovide a configuration to </span><span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">configure</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"> rootPath in the page properties of the home-page template.</span></li>
<li><span style="font-family: "arial";"><span style="font-size: 11pt; white-space: pre-wrap;">Make the change in body.html and add the "pageheader.html" in body.html and include the below code in pageheader.html.</span></span><span id="docs-internal-guid-5faf6d7d-7fff-62f7-399b-ec55417cd71f"><br /><div align="left" dir="ltr" style="margin-left: 72pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="414"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 9pt; font-style: italic; vertical-align: baseline; white-space: pre-wrap;"><sly data-sly-test.resourceType="${pageProperties.sling:resourceType}"/></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 9pt; font-style: italic; vertical-align: baseline; white-space: pre-wrap;"><sly data-sly-test.mode="${resourceType == 'aem-project/components/structure/homepage' ? 'edit' : 'disabled'}"/></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 9pt; font-style: italic; vertical-align: baseline; white-space: pre-wrap;"><sly data-sly-test.rootPath="${inheritedPageProperties.rootPath}"/></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 9pt; font-style: italic; vertical-align: baseline; white-space: pre-wrap;"><sly data-sly-test.header="${rootPath}/jcr:content/header"/></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 9pt; font-style: italic; vertical-align: baseline; white-space: pre-wrap;"><header></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 9pt; font-style: italic; vertical-align: baseline; white-space: pre-wrap;"> <sly data-sly-resource="${ @path= header, resourceType='/apps/aem-project/components/content/languagenavigation', wcmmode=mode}"></sly></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 9pt; font-style: italic; vertical-align: baseline; white-space: pre-wrap;"></header></span></div>
</td></tr>
</tbody></table>
</div>
</span><span id="docs-internal-guid-eb2ed1ed-7fff-d39a-c0de-7e7eaf11680f"><div align="left" dir="ltr" style="margin-left: 72pt;">
<br /></div>
</span></li>
<li><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">By this approach all the templates and pages will share the same header and footer and author can only change the header and footer at the root Page level.</span></li>
<li><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">All the pages inside the rootPage must inherit the home-page component.Then only the logic of header footer will work fine.</span></li>
</ol>
<div style="text-align: left;">
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>Pros and Cons of this solution: </b></span></span></div>
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372">
</span>
<br />
<ul style="margin-bottom: 0px; margin-top: 0px; text-align: left;"><span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372">
<li><span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">You don’t need to drag and drop the component on each template.On the root Page itself you can change the content.</span></span></li>
<li><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Any author can change the header and footer at the root page.</span></li>
<li><span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">The header/footer should work with MSM based live/language copies. You can change the value of the rootpath by rollout configuration for each live/language copy.</span></span></li>
</span></ul>
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b>Demonstration Video of Implementing Header and Footer using the above approach:</b></span></span></span><br />
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/J6vcay2ETw8" width="560"></iframe>
<br />
<div style="text-align: left;">
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Solution 3</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">: You can create a template for the root level and provide configurations for all the header and footer in the page properties and fetch the value by calling inherited Page properties and all the pages will share the same header and footer.</span><br />
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span id="docs-internal-guid-1a442727-7fff-09d6-c63a-f6f564456231">
</span>
</span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span id="docs-internal-guid-1a442727-7fff-09d6-c63a-f6f564456231"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>Pros and Cons of this solution: </b></span></span></span></div>
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span id="docs-internal-guid-1a442727-7fff-09d6-c63a-f6f564456231">
</span></span>
<br />
<ol style="margin-bottom: 0px; margin-top: 0px;"><span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span id="docs-internal-guid-1a442727-7fff-09d6-c63a-f6f564456231">
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">No Need to put any additional logic to render header and footer and the configuration of header and footer is free from template.</span></span></li>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">If header and footer has so many configurations, your page properties may look messy.</span></span></li>
</span></span></ol>
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span id="docs-internal-guid-1a442727-7fff-09d6-c63a-f6f564456231">
</span></span>
<br />
<div>
<br /></div>
<div>
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span id="docs-internal-guid-1a442727-7fff-09d6-c63a-f6f564456231"><span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Hope it will help you guys !!</span></span></span></span></span></span></span></span></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span id="docs-internal-guid-1a442727-7fff-09d6-c63a-f6f564456231"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span id="docs-internal-guid-1a442727-7fff-09d6-c63a-f6f564456231"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span></span></div>
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span id="docs-internal-guid-1a442727-7fff-09d6-c63a-f6f564456231"><span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Thanks and Happy Learning.</span></span></span></span></span></span></span></span></span></div>
</div>
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372"><span id="docs-internal-guid-1a442727-7fff-09d6-c63a-f6f564456231">
</span></span></div>
<span id="docs-internal-guid-285d2fa3-7fff-8b62-2481-36cae8d43372">
</span></div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com5tag:blogger.com,1999:blog-7481371294519000730.post-90270598668830079622019-10-18T13:04:00.002+05:302019-10-18T13:49:53.327+05:30Troubleshooting in AEM 6.2<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSMsK6vLNTW0Ny-GoJ_cwmbps0uZe-AU7e3kLO_R4Q6ypHWeEPq2T5nH8CocFyoaWsylzg9rTZvGHmOXeUrMJF8m82DZbI1TBtGs_NEZiss13rEydW6576hEyiT1Y0_gJF1qHSELiK1hOL/s1600/aem+6.2+issues.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSMsK6vLNTW0Ny-GoJ_cwmbps0uZe-AU7e3kLO_R4Q6ypHWeEPq2T5nH8CocFyoaWsylzg9rTZvGHmOXeUrMJF8m82DZbI1TBtGs_NEZiss13rEydW6576hEyiT1Y0_gJF1qHSELiK1hOL/s320/aem+6.2+issues.png" style="display: none;" /></a></div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Hello Everyone,</span></div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">I started this blog a bit long ago, but I am publishing it today because “<i>it’s never </i></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;"><i>too late to mend</i></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;">”</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> :-)</span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Recently I am working on AEM 6.2 and I faced few issues in my project. </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">I am not sure if the same issues exist in updated versions of AEM or not. But if you are facing similar issues in your project, this blog might help you.</span><br />
<div>
<br /></div>
</div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Issue 1</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">While doing AEM server set up, when you up AEM 6.2 jar using "</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;"><b>nosamplecontent" </b></span><br />
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">run</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">mode and login the server using admin also, you won’t be able to see the repository </span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">in the </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">crx repo.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="190" src="https://lh4.googleusercontent.com/tu0OIYKYTDydouNa8a6S_twLx2xQIgAesJpoX8aBVdUSe4GKqAJq0eEkFmAypaHhCT03Rrvphqy8vYJI08SJovBleivFUcTTQ-xKWMvkVhUSVtRUxanrS50xgwxTzcOzlpZ3COLc" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="359" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig1: crx Repository Not visible</b></td></tr>
</tbody></table>
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">To solve this issue, you need to change the value of Root Path as "/crx/server" in </span><br />
<span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">"</span><span style="color: black; font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre;">Apache Sling DavEx Servlet" </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">OSGi Configuration.</span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="153" src="https://lh6.googleusercontent.com/iA9C0_1tab-abirLLKoXRxEk2x57kDoc9_vBygS_-A6NXCMes3Yuk-yt5PCWfF1wwDe3C2j9uenoxhW6As-9a5h7Y2x_AtOuDKdeoSUPyUB2FUROdPqj2EyVxIOE7YYISLu-cOtu" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="442" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig 2: Apache Sling DavEx Servlet</b></td></tr>
</tbody></table>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b><br /></b></span>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Issue 2</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">In AEM 6.2, While opening the page, console shows the issue </span><br />
<span style="color: black; font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre;">“</span><span style="color: black; font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre;"><i>Uncaught ReferenceError: CQ is not defined</i></span><span style="color: black; font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre;">”.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-b6bdd462-7fff-2ebd-d27e-21fab7e8c420"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Many people has suggested different solution to this problem in internet.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-0f2cadb3-7fff-d6f1-60b1-59ff12aaa45f"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The solution which worked for me is: Add a dependency </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>“cq.shared”</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> in the </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">clientlib </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>“/etc/clientlibs/foundation/main”</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> and this issue will no more visible to you.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-4bdb1bf6-7fff-b307-41e4-05168c8a9580"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Issue 3</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">:</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">When there are a lot of components/requests on a page(ideally more than1000) </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">in AEM 6.2 and we are also running samplecontent on our AEM, then sometimes </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">you are not able to go to edit Mode and encountered this exception </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">“</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: italic; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">org.apache.sling.api.request.TooManyCallsException</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">”, </span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">Because there are max sling </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">requests already defined in an OSGi Configuration </span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">and to solve this issue and increase </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">the size off sling requests.</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">To solve this issue, Go to the OSGi Configuration "Apache Sling Main Servlet"</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">and Increase (may be 10000) the "<b>Number of calls per request</b>".</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="248" src="https://lh4.googleusercontent.com/lDRMBBv3QyNHX7MPsHZ7-nX0vlZRfcNJdMKE590g6plshK-nJpMz_vZ6e42Gb70qbJz3uS4q_omsZdFGYvYy475pWNvhfxmEZov8Mix8BLRL5JNl1uZ43hNC2KD9zU3ILWpAr-dA" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="440" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig 3: Apache Sling Main Servlet</b></td></tr>
</tbody></table>
<span style="background-color: white; color: #222222; font-family: "arial"; font-size: 13.3333px; font-weight: 700; white-space: pre-wrap;"><br /></span>
<br />
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Hope it will help you guys !!</span></span></span></span></span></span></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Thanks and Happy Learning.</span></span></span></span></span></span></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
</div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com3tag:blogger.com,1999:blog-7481371294519000730.post-61882163447520300942019-10-16T14:02:00.002+05:302019-10-17T07:25:22.541+05:30How to set password policy for AEM Users<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_JuWOo-U6bqBSqOVSXEk8quyTomT6_hYApZxgS19WuT-BhWg_14ExrbVfAKxLuoigfPunCOwr2nhsaPKCnNf6CDPtxsrJ8nzs2gX0lvr4ZVvm09jF77pwjn4ZkBFCzE0nQBHqhEPvHaWV/s1600/blog+apache.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_JuWOo-U6bqBSqOVSXEk8quyTomT6_hYApZxgS19WuT-BhWg_14ExrbVfAKxLuoigfPunCOwr2nhsaPKCnNf6CDPtxsrJ8nzs2gX0lvr4ZVvm09jF77pwjn4ZkBFCzE0nQBHqhEPvHaWV/s320/blog+apache.png" style="display: none;" /></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Hello Everyone,</span></div>
<span style="font-family: arial; font-size: 11pt; white-space: pre;"><br /></span>
<span style="font-family: arial; font-size: 11pt; white-space: pre;">In my recent AEM project, Adobe was the one who was handling servers and one day </span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">when I was trying to create users in AEM via classic UI, so there was no error while </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">creating users but when i search for that particular user, i could not able to find the user.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-93579ba5-7fff-09d3-c26a-8e939ce5020b"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">I raised this issue to Adobe and got to know that they have made a configuration </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">for password constraint and while making users we need to follow that constraint.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-9523dd0d-7fff-4644-2962-430aaef1ed27"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Now the question is where Adobe defined the constant for password policy and is </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">it a good thing to do?</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">There is one OSGi Configuration in Felix console which is </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">“Apache Jackrabbit </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Oak Authorizable ActionProvider”.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-c6092bb7-7fff-8b26-902c-542de21b23c4"></span></span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="197" src="https://lh4.googleusercontent.com/jgFGGuHX1VlBc-wqeWDPHRX0UVfGQgf9BX58JpbR6rBRVmQ0j7-3KQATXzsoRpKvnFb7hSVlJr5G_MA1AklDAslhjKHOq2x8CdZ1uw1A62CleR7QOEYEuKYtiGCSR87FGZzTSaEv" style="font-family: Arial; font-size: 11pt; font-weight: 700; margin-left: auto; margin-right: auto; margin-top: 0px; white-space: pre-wrap;" width="555" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig:Apache </b><span style="font-size: 12.8px;"><b>Jackrabbit</b></span><b> Oak Authorizable ActionProvider</b></td></tr>
</tbody></table>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">In this configuration enable the “</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>PasswordValidationAction</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">” in the “</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Authorizable Actions</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">” </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">and add the regex in "</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;"><b>Configure</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>PasswordValidationAction:Password Constraint</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">".</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The ideal constraint defined by adobe is :</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(?\=.*\\d.*)(?\=.*[a-z].*)(?\=.*[A-Z].*)(?\=.*[@#%\\*\\-+\=~\\[\\]{}<>\\?].*).{12,}</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Which means at least 12 characters,one uppercase,one lowercase, one digit and </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">one special character.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">But it’s completely your choice which regex value you want to configure.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">In AEM, by default we can assign any password to a user. But we can restrict </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">this and force users to strict password validation rule to increase more security </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">for the users so that nobody can create users with simple passwords and accounts </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">can be hacked easily.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-95ea527f-7fff-763e-9898-db5fb029238f"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Note</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> :If you face a similar issue, then yes in </span><a href="http://localhost:4502/useradmin" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">classic UI</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> this is an AEM (I checked in 6.5)</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> issue that it doesn’t show any error if you don't follow the policy but in </span><a href="http://localhost:4502/security/users.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">touch UI</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">, </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">i</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">t shows the error notification.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>Note</b>: If your servers are not being handled by adobe but by yourself, it is always </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">recommended</span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"> to enable the password constraints for the servers.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Hope it will help you guys !!</span></span></span></span></span></span></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Thanks and Happy Learning.</span></span></span></span></span></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com0tag:blogger.com,1999:blog-7481371294519000730.post-90752131234249101142019-10-16T09:20:00.000+05:302019-10-16T09:26:24.530+05:30Accessibility in AEM: Bold vs Strong and Italic vs Emphasis<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb8xcgZw6cmcAZKLNBRSxmRvogsizXLum8msf_PAaSTJVkEE1-oyraStWcN9gP5HlI5mY3hDjAW2QeXQqgqHJE78nv5UIQbBTSLbuTxuNOlRXJICaFdnAWX8Ra-G4fe4iu11vxOWMSlegk/s1600/blog_new.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb8xcgZw6cmcAZKLNBRSxmRvogsizXLum8msf_PAaSTJVkEE1-oyraStWcN9gP5HlI5mY3hDjAW2QeXQqgqHJE78nv5UIQbBTSLbuTxuNOlRXJICaFdnAWX8Ra-G4fe4iu11vxOWMSlegk/s320/blog_new.png" style="display: none;" /></a></div>
<span style="background-color: white; font-family: "arial"; font-size: 11pt; white-space: pre;">Hello Everyone,</span><span id="docs-internal-guid-0cd5545b-7fff-8bf4-9090-2b9f83d5718b"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-e027d1a9-7fff-c03e-dbc7-bfa505fd8b15"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Web accessibility refers to the practice of using website design and development that </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">removes obstacles of access or usability for people with disabilities(blind people). </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If you want to make your online content accessible to those using a screen reader:</span></div>
<ul style="margin-bottom: 0; margin-top: 0;">
<li dir="ltr" style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre;">Avoid from using style tags such as <b> and <i></span></span></div>
</li>
<li dir="ltr" style="background-color: transparent; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre;">Use semantic tags <strong> and <em> (italics)</span></span></div>
</li>
</ul>
<span style="background-color: white; font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="background-color: white; font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">In AEM, to render content in form of Text we use RTE component and OOTB RTE </span><span style="background-color: white; font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">plugin contains <b> and <i> tags.</span><br />
<span style="background-color: white; font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="background-color: white; font-family: arial; font-size: 11pt; white-space: pre;">Now the question is, if there is any way to convert these tags into the corresponding </span><br />
<span style="background-color: white; font-family: arial; font-size: 11pt; white-space: pre;">semantic tags in RTE component and if yes then how?</span><br />
<span style="background-color: white; font-family: arial; font-size: 11pt; white-space: pre;"><br /></span>
<div style="text-align: left;">
<span id="docs-internal-guid-5c1dafa1-7fff-da6b-da76-75effc4eddfa">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-ac510ccf-7fff-8ed2-d635-8321f400f7db"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Here is the step by step procedure:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-67716309-7fff-bb7a-d6af-b54bb0979caa"></span></span></div>
<ul style="margin-bottom: 0px; margin-top: 0px; text-align: left;">
<li style="font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial";"><span style="background-color: white; font-size: 14.6667px; white-space: pre-wrap;">Add a htmlRules node of type (nt:unstructured) parallel to rtePlugins.
</span></span>
</div>
</li>
</ul>
<span id="docs-internal-guid-e4276cb0-7fff-b8c4-1129-84e57f85a050"><span style="background-color: white; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="border: none; display: inline-block; height: 113px; overflow: hidden; width: 624px;"><span id="docs-internal-guid-a0295c94-7fff-aa51-0c23-6ad702db432d"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="border: none; display: inline-block; height: 100px; overflow: hidden; width: 549px;"><img height="100" src="https://lh4.googleusercontent.com/wfWuaExAtPV3MmN-KlQukS1mmYehkw9cEEeTSdC_UHOqyIYK_P5wkEl6jmmMfYLR3WqKtg1Irkuq8q8i-2RC0w5GYmOHxZ_qaivVY4LpwBd9PyXb8zXKpaISL9-8Jj0zsYLmGGpm" style="margin-left: 0px; margin-top: 0px;" width="549" /></span></span></span></span></span></span><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span><ul style="margin-bottom: 0px; margin-top: 0px; text-align: left;">
<li style="font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-size: 14.6667px; white-space: pre-wrap;"><span style="font-family: "arial";">Under htmlRules, create a node name “docType” of type nt:unstructured.</span></span></div>
</li>
<ul>
<li><span id="docs-internal-guid-5c1dafa1-7fff-da6b-da76-75effc4eddfa" style="font-size: 14.6667px; white-space: pre-wrap;"><span style="font-family: "arial";">Add a property called baseType of value “html”.</span></span></li>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">Add a property called version of value “4.0”.</span></span></li>
</ul>
</ul>
<span id="docs-internal-guid-0fdd1a17-7fff-fc61-0824-3bd796b470a5"><span style="background-color: white; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="border: none; display: inline-block; height: 125px; overflow: hidden; width: 569px;"><img height="125" src="https://lh6.googleusercontent.com/iFqBzVCzuMapJfupcdXDA42_oZLn1ryoHcdqGfvfDuXeIk-1vzbJUZinFSKhK4SLYtZJ_lzi3u0s8si4KgGZVjSp1E5HqvdzM3SVGTxejVwXTsXKKRBOlBhiuiqpIG46Rd08NqLd" style="margin-left: 0px; margin-top: 0px;" width="569" /></span></span></span><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span><ul style="margin-bottom: 0px; margin-top: 0px; text-align: left;">
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">Create a node “typeConfig” of type nt:unstructured under the node docType.</span></span></li>
<ul>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><span id="docs-internal-guid-262e41d9-7fff-30fc-b18c-0459a18ac482"><span style="background-color: white; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">Add a property called isXhtmlStrict of boolean {true}.</span></span></span></span></li>
<li><span style="background-color: white; font-size: 14.6667px; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial";">Add a property called “useSemanticMarkup” of boolean{true}.</span></span></li>
</ul>
</ul>
<span id="docs-internal-guid-641cb1b6-7fff-8e49-93ce-03bea2a0815a"><span style="background-color: white; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="border: none; display: inline-block; height: 109px; overflow: hidden; width: 541px;"><img height="109" src="https://lh5.googleusercontent.com/FnIo396ozgUr_IzOmmVcdOuMImacc8HUw-I8wQ_OII3TSpoNfFPJrM-hB311UswGLYSQ2vx1S1g53QHJyqSPZEK9uIGzDHep8D3Lx6WhNtl2hKkjWOzet5Pu2ZpHI2bNpAlibd6p" style="margin-left: 0px; margin-top: 0px;" width="541" /></span></span></span><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span><span id="docs-internal-guid-715d6a8d-7fff-89ff-bdec-a1db25d1b610"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">That’s all. You drag and drop the RTE component and configure the bold and italic plugins. The <b> and <i> will automatically get converted into corresponding semantic tags i.e.,“strong” and “em”.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Below is the screenshot that shows how the tag gets converted into its semantic tags.</span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="106" src="https://lh4.googleusercontent.com/2Gnu7iBV8QOHM_UAdeku_wcaZE1jhJBxZ5t2zcVzoI6cZOSclxUufdA7XbpqgbQl40cBGDtFNAoC28qMzY6b5WnpNwgIDPuCvFWPhayIU1Epuz7rlaO7DgUnKS43IqBi4jc9milU" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="372" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig: After Converting Semantic Tag</b></td></tr>
</tbody></table>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>Advanve UseCase:</b></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ba0116f3-7fff-1575-67ae-1a9800dacdc1"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If there are any other tags which you want to convert into corresponding semantic tag </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">or if you want to convert <i> to <em> but don't want to convert <b>, or want to </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">convert any other tag for example <u> to <label> tags, so you can put mapping also..</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-72640ba1-7fff-92b1-eefe-ec77a11a1468"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">In continuation with the above steps, we need to add one more step as shown below.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-781af1b1-7fff-bc16-61d1-f09e807a08fe"></span></span></div>
<ul style="margin-bottom: 0px; margin-top: 0px; text-align: left;">
<li style="font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline;"><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial";"><span style="background-color: white; font-size: 14.6667px; white-space: pre-wrap;">Create a node “semanticMarkupMap” of type “nt:unstructured” under the node “typeConfig”.</span></span></div>
</li>
<ul>
<li><span id="docs-internal-guid-5c1dafa1-7fff-da6b-da76-75effc4eddfa"><span id="docs-internal-guid-715d6a8d-7fff-89ff-bdec-a1db25d1b610" style="font-size: 14.6667px; white-space: pre-wrap;"><span style="font-family: "arial";">Add a property b and value as "b".</span></span></span></li>
<li><span id="docs-internal-guid-5c1dafa1-7fff-da6b-da76-75effc4eddfa"><span id="docs-internal-guid-715d6a8d-7fff-89ff-bdec-a1db25d1b610" style="font-size: 14.6667px; white-space: pre-wrap;"><span style="font-family: "arial";">Add a property i and value as "em".</span></span></span></li>
<li><span id="docs-internal-guid-5c1dafa1-7fff-da6b-da76-75effc4eddfa"><span id="docs-internal-guid-715d6a8d-7fff-89ff-bdec-a1db25d1b610" style="font-size: 14.6667px; white-space: pre-wrap;"><span style="font-family: "arial";">Add a property u and value as "label".</span></span></span></li>
</ul>
</ul>
<span id="docs-internal-guid-42913ab0-7fff-25eb-2ed3-fe44916ca507"><span style="background-color: white; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span><div>
<span id="docs-internal-guid-42913ab0-7fff-25eb-2ed3-fe44916ca507"><span style="background-color: white; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span><span id="docs-internal-guid-cd5bfcd5-7fff-51d6-3d88-e62c902ff5ac"><span style="background-color: white; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="border: none; display: inline-block; height: 105px; overflow: hidden; width: 530px;"><img height="105" src="https://lh3.googleusercontent.com/Gy8CRhgkLCi5uFCfh4yQsbbbJsR4cMk7SZuRcMz60l086pKFXPgaWHKNUSp0l6MlOVZ6EBMSD_Qx6cbe3gImqAdXj4dZAduHw6U_iZgnpGTNiP2sIM9m1iyEh5sDRz3srVTPSupH" style="margin-left: 0px; margin-top: 0px;" width="530" /></span></span></span></div>
<div>
<br /></div>
<div>
<span style="background-color: white; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">This is how the DOM looks like after the above mapping. By the advanced use case you can convert any tag to any other tag just by configuring the mapping here.</span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="132" src="https://lh4.googleusercontent.com/B11zMnVdtq8e_BHmBraUhm70b7qzc5k3UbNn_HckM7d24d6XkqiQ1UKJXTqtWiREQ2uDbbg0hZFLtVG3ouSyC3mHB4-j6JTJiEboCFsX08XbMr0ILFNKmlOIm52fDAUUf0M7Ykpp" style="background-color: white; font-family: Arial; font-size: 14.6667px; margin-left: auto; margin-right: auto; margin-top: 0px; white-space: pre-wrap;" width="224" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig: The DOM after mapping of tags</td></tr>
</tbody></table>
<div>
<b style="font-family: Arial; font-size: 14.6667px; white-space: pre-wrap;">Note</b><span style="background-color: white; font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">: "label" is not a semantic tag of "u".I just want to show the example of how to map one tag to some other HTML tag in RTE.</span></div>
</span></span><br />
<div>
<span id="docs-internal-guid-5c1dafa1-7fff-da6b-da76-75effc4eddfa"><span id="docs-internal-guid-715d6a8d-7fff-89ff-bdec-a1db25d1b610"></span></span><br />
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-5c1dafa1-7fff-da6b-da76-75effc4eddfa"><span id="docs-internal-guid-715d6a8d-7fff-89ff-bdec-a1db25d1b610"></span></span><span id="docs-internal-guid-5c1dafa1-7fff-da6b-da76-75effc4eddfa"><span id="docs-internal-guid-715d6a8d-7fff-89ff-bdec-a1db25d1b610"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;"><br /></span></span></span></span></span></div>
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Hope it will help you guys !!</span></span></span></span></span></span></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Thanks and Happy Learning.</span></span></span></span></span></span></span></div>
</div>
</div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com6tag:blogger.com,1999:blog-7481371294519000730.post-32296038042402710682019-10-15T12:35:00.000+05:302019-10-15T12:35:27.549+05:30AEM : PDF is getting Downloded Instead of opening in new Tab<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZBg7mfHNCtOQgTShArJpZaqlt51nW8Tc4PcwQJ7US61mMvYdb5uOcdAqR3LrqUF69odRQTL4qNVbNkIDrDvV1AnZgJ6eLA4MybPM2dG6jlD6_cxNnnst4QgT0qY65yKMEMsvXSy5-u0b0/s1600/blog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZBg7mfHNCtOQgTShArJpZaqlt51nW8Tc4PcwQJ7US61mMvYdb5uOcdAqR3LrqUF69odRQTL4qNVbNkIDrDvV1AnZgJ6eLA4MybPM2dG6jlD6_cxNnnst4QgT0qY65yKMEMsvXSy5-u0b0/s320/blog.png" style="display: none;" /></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Hello Everyone,</span></div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">While working in an AEM website, I faced one issue in which when we click on any PDF link, </span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">the PDF gets downloaded instead of opening in new Tab.</span></div>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;"><b>Client Expectation</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">This particular client was looking for providing information to the users upfront.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">It is annoying when user click on PDF and it gets download and then user need to go to </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">downloads to open the PDF.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-71044c6c-7fff-998c-60fb-bc38c1172acc"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">But the question is how browser decide whether to download the file or whether need to </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">open in new Tab??</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Basically, this happens because the website tells the browser to do it. Occasionally, it's </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">because </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">the website developer decides they want this behavior, e.g. common on file sharing sites. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Other times, it's because it's a default option for whatever software they're using. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Sometimes it's because the site dev has no idea what they're doing.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<h1 dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Content-Disposition:</span></h1>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-1e28df0f-7fff-b5ad-c1ea-99137b547ce4"></span></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">That's usually because the site sends a </span><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition" style="text-decoration: none;"><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Content-Disposition</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> header in the response. Specifically, it can send either inline or attachment.</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Inline</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: inline is the default if not otherwise specified, and means the browser will </span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">open the </span><span style="background-color: transparent; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">file </span><span style="background-color: transparent; font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">within the browser window if it is able to.</span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-4c2d10ff-7fff-e60b-e011-641b5c83e8c6"><span style="background-color: transparent; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">attachment:</span><span style="background-color: transparent; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"> means to always download the file, nev</span><span style="background-color: transparent; color: #242729; font-size: 11.5pt; vertical-align: baseline;">er attempt to open it </span></span></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="background-color: transparent; color: #242729; font-size: 11.5pt; vertical-align: baseline;">inside the browser.</span></span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="101" src="https://lh5.googleusercontent.com/4vXSy0nwc79C8PjpQDNkbODUnSCPKeeWtDspbc85FVHZJ4MVUDoG7H-guuGMjXUXxxrd18GjJmdxfcvTEfHkVYcTOvHgyCQfW0WgTLFiT2tVf5eFAu_wONm5ER3z8eGAb1ok-kFW" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="400" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig 1: Content-Disposition attachment in response headers</b></td></tr>
</tbody></table>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-7e6e9ca9-7fff-443e-95b4-adcf4cf52321"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">But I have not set any Content-Deposition as attachment in AEM so from where it is </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">coming and how to make it inline.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-e43768be-7fff-f470-c593-482ed1ed3fef"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">There is an OSGi Configuration in Felix console named "</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Apache Sling Content </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Disposition Filter" </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">which controls Content Disposition for different mime types based on the path.</span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="288" src="https://lh5.googleusercontent.com/JDUK3V7l0uGlYJN-7PPPiemLUKRC33eimgIeFRsJIUGMgTjJnwyKsqFJAIwAd-ffG0cutmB_8wkIO-g0q_HvyA9kBrKDPKyPvTG1HDo5ShPbk1ygOnuCmSi1UHPoP6TVtuRCEKVd" style="margin-left: auto; margin-right: auto; margin-top: 0px;" width="588" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig 2:Apache Sling Content Disposition Filter</b></td></tr>
</tbody></table>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-697a8aac-7fff-f29d-f4d1-014007957613"></span></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b><br /></b></span>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Note:Content disposition filter is a security feature against XSS attacks on SVG files.</b></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The Content Disposition Filter options provide the following functionality: </span></div>
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
</div>
<ul style="text-align: left;">
<li><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-a5d7ddf5-7fff-4a78-aed4-12c2507559c2"><span style="background-color: transparent; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">Content Disposition Paths</span><span style="background-color: transparent; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">: </span></span></span><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">a list of paths where the filter will be applied followed by a list of mime-types to exclude on that path.This path must be an absolute path and may contain a wildcard ('*') at the end, to match every resource path with the given path prefix. For example: /content/*:image/jpeg,image/svg+xml " will apply the filter to every node in /content except jpg and svg images
</span></span></li>
<li><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Excluded Resource Paths</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">: a list of excluded resources, each resource path must be given as absolute and fully qualified path. Prefix matching/wildcards are not supported.</span></li>
<li dir="ltr" style="font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b>Enable For All Resource Paths: </b>this flag controls whether to enable this filter for all paths, except for the excluded paths defined by Excluded Resource Paths. Setting this to 'true' leads to ignoring Content Disposition Paths. Independent of the configuration only resource paths are covered which contain a property named 'jcr:data' or 'jcr:content jcr:data'.</span></span></div>
</li>
</ul>
<br />
<div dir="ltr" style="background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-d9c5f130-7fff-52b7-5af1-d57e1fa04638"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre;"><b>Solution</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">: As stated in the problem statement,the website is having hundreds of </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">PDFs to </span><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre;">render </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">so i can not add every PDF URL in Excluded Resource Paths.So </span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">i unchecked the </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">“</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>enable </b></span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>for </b></span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>all resource Paths</b></span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">” Checkbox which will enable </span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">the Content-Disposition </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">response header as inline.</span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">If you want to enable certain </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">paths to </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">make downloadable </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">you can make an entry in included resourceTypes.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Here because the website is having svg images and svg images are vulnerable to XSS </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">attacks </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">so I added “/content/*:image/svg+xml” in the "<b>Included Resource Paths and Content Types</b>."</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Hope it will help you guys !!</span></span></span></span></span></span></span></div>
<div dir="ltr" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div style="background-color: white; color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Thanks and Happy Learning.</span></span></span></span></span></span></span></div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com11tag:blogger.com,1999:blog-7481371294519000730.post-69013161458353249582019-10-09T14:45:00.001+05:302019-10-09T14:54:31.660+05:30Debugging Dispatcher Authorization Issues<div dir="ltr" style="text-align: left;" trbidi="on">
<span id="docs-internal-guid-23225151-7fff-8f30-6075-c6b063128295"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Hello Everyone,</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-50dbea17-7fff-9e8b-9205-f2488ad0a481"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Recently while doing dispatcher configuration for an AEM Website, I realized </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">that the cache ratio was 0% and the requests were not caching in the dispatcher.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-15571471-7fff-efd1-7d71-5de00ce9f12c"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">While checking the dispatcher logs in detail I realized that dispatcher is considering</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">every request as a secure request.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<img height="63" src="https://lh6.googleusercontent.com/X0oGoMoEEBmv0eS_MwbbjSj6dI945kINrrEqu6vJqNeHEVPiSxLZgslxUL2BxmFF8RquxNAuULw42j_jA8sNPOTBue5hJjg3pJU_4SojsV0rda-Os-1dw2-a7TmhqPEMz8iYIbyf" style="font-family: Arial; font-size: 11pt; margin-left: 0px; margin-top: 0px; white-space: pre-wrap;" width="595" /></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-ff65c7d7-7fff-1653-c6bf-507ecfaaf84e"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Here, The website is completely static and there is no login and secured content. So why the dispatcher is showing “request contains authorization”.</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-e8c46fbd-7fff-4309-85bb-b28aa2e3d72a"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Because of this issue, all the requests were hitting to publisher every time and that </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">makes the page performance low.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-1f250f58-7fff-8a01-f9b8-29aff6406339"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The simple and quick solution for this is to allow caching of authorized content with the </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">dispatcher setting.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-c11e2409-7fff-cfbc-9fb1-6b33acc48b94"><span style="background-color: black; color: #40ff00; font-family: "courier new"; font-size: 10pt; vertical-align: baseline;"><span style="border: none; display: inline-block; height: 35px; overflow: hidden; width: 260px;"><img height="35" src="https://lh5.googleusercontent.com/DeJk4ck_ie1pzeOh2z-qgkJeuW7TsgXmhblUM5oPEK-rFpEBQ---vACp8-3Eimxu-1l0cYSffpvCBHPBXezsHs6lc60b9I4QfTSJann5j3_zzIHwdcvPZLUNGWIS8IevzQd8kjJw" style="margin-left: 0px; margin-top: 0px;" width="260" /><span style="background-color: transparent; font-family: "arial"; font-size: 11pt;">But this is not an ideal way of doing it. We need to figure out why this issue is coming.</span></span></span></span></span></div>
<span id="docs-internal-guid-9c9470e1-7fff-2a59-8d12-e430c26d77a4"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-9c9470e1-7fff-2a59-8d12-e430c26d77a4"><span id="docs-internal-guid-cff7922c-7fff-a906-9ea7-c55e5758dfe4"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">However this setting now allows caching of secure content, which may be a security concern.</span></span></span></div>
<span id="docs-internal-guid-9c9470e1-7fff-2a59-8d12-e430c26d77a4">
</span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-9c9470e1-7fff-2a59-8d12-e430c26d77a4"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">But this is not an ideal way of doing it. We need to figure out why this issue is happening.</span></span></div>
<span id="docs-internal-guid-9c9470e1-7fff-2a59-8d12-e430c26d77a4">
</span>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-9c9470e1-7fff-2a59-8d12-e430c26d77a4"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: 11pt;"><br /></span></span></span></div>
<span id="docs-internal-guid-9c9470e1-7fff-2a59-8d12-e430c26d77a4">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">So I figured out that Dispatcher was having a public domain and can be accessed from anywhere and client don’t want people to access it before going live.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-265acc42-7fff-6335-2123-da48c84ab25f"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">To resolve this I had added a secure layer in Apache. Because of that additional </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">security, every request contains “Authorization” in header and </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">dispatcher understood it as a secure content.</span><img height="167" src="https://lh5.googleusercontent.com/Da_0PmK_NYrLJ0S74Gg4K6H7W8yC4XQKHTZ6LhX6e_v8IEKk-YCz35P-POt2MIoIRTTii4MK3NQLXVCPwwCPV80Vo7qJ0x62R4RMON8mfeKUap2jO8VguKDdoniA7cE3sMlSTIKS" style="font-family: Arial; font-size: 11pt; margin-left: 0px; margin-top: 0px; white-space: pre-wrap;" width="556" /></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-c0e2a503-7fff-83d0-d180-874143b74c6e"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">So remember, don’t simply set /allowAuthorized to “1” in order to solve an authorisation </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">problem unless you actually have secured content that you want to cache – </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">there may be other reasons your dispatcher is thinking your request contains authorisation </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">headers.</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-0922ad2d-7fff-827e-e249-f5677afbf894"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">To solve my issue, I added allowAuthorized as “1” for the appropriate performance testing on </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">pre production server, as client don't want to remove this security layer from dispatcher until </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">go </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">live. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If i don't do that this may impact the Performance Test results but I will again make it “0”</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">once we go live.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div style="color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Hope it will help you guys !!</span></span></span></span></span></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div style="color: #222222; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-size: 11pt; vertical-align: baseline;"><span style="font-size: 13.3333px; font-weight: 700;">Thanks and Happy Learning.</span></span></span></span></span></span></span></div>
<div>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></div>
</span></div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com1tag:blogger.com,1999:blog-7481371294519000730.post-31885890207433186772019-07-06T10:11:00.000+05:302019-07-06T19:38:53.916+05:30Add MySQL Driver in JBoss Server<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
</div>
<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2BHrLNHBIay-WPjMUaK7RhF-4TtfbLs0V8Kj-FrsmKHa2yrDIL_E3d6pE9ajFENJRvVbQACnoE-dZniz27XzGXfmrUEEEF_V0ec9ucQMfjAs95AcmRgyqNVabLeDamXTC0-AhRxyPQlV-/s320/Picture1.png" style="display: none;" />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre;">Hello Everyone,</span><span id="docs-internal-guid-d02e986c-7fff-70cb-b32f-3fad95e378e1"></span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-e9fe4b30-7fff-ab93-07c2-12e222459465"></span></span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">In the </span><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;"><a href="http://www.sgaemsolutions.com/2019/06/preparing-your-spring-boot-app-to.html" target="_blank">previous blog</a></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">, you have already gone through a sample application of spring </span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">boot to be deployed in JBoss container.</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-2782a18e-7fff-50e4-24ef-bb6f3312da33"></span></span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Now in this blog, we will see how to add mysql driver in JBoss and through JNDI URL,</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">how Spring boot </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre;">gets connected with database.</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Before going to coding part, we need few prerequisites to set up database with JBOSS. </span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Here we don’t directly put database configurations in spring boot </span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">application.properties.</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-886e1857-7fff-11df-1838-442f9eb7d982"></span></span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">So we create JNDI configuration in JBoss and add that configuration in spring boot </span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">properties file to connect to database.</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-9f1a58f0-7fff-3650-37f2-6dfe56989116"></span></span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"><u>How to add mysql driver in JBOSS and create a JNDI URL:</u></span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Out of the box, JBoss only comes with an H2 JDBC driver. Most likely, you have a different </span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">database such as Oracle, MS SQL or MySQL. As long as you have access to JBoss, </span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">installing the appropriate JDBC driver is fairly straightforward.</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-c50730aa-7fff-b288-9d9d-ccd41fbeebf2" style="font-weight: normal;"></span></span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The advantage of installing it into JBoss itself is:</span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
</div>
<ul style="text-align: left;">
<li><span style="background-color: transparent; font-size: 14.6667px; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial";">You can enforce a specific JDBC driver version for all of your deployed applications.</span></span></li>
<li><span style="background-color: transparent; font-size: 14.6667px; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial";">If any changes required in database configurations, no need to change in code base.</span></span></li>
<li><span style="background-color: transparent; font-size: 14.6667px; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial";">If different environments are connected to different databases, still you can manage the same JNDI URL for all the environments. So environment specific configurations are not needed.</span></span></li>
<li><span style="background-color: transparent; font-size: 14.6667px; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial";">Multiple applications can also share the same JNDI URL.</span></span></li>
</ul>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">So below are the steps to install MySQL drivers in JBoss.</span></span></div>
<ul style="text-align: left;">
<li><span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">Navigate to the directory $JBOSS_HOME/modules/system/layers/base</span></li>
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1">
<li><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">Create com/mysql/main directory.</span></span></div>
</li>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">Navigate to main directory and save <a href="https://dev.mysql.com/downloads/file/?id=480091" target="_blank">MySQL JDBC driver's jar </a>there.</span></span></li>
</span></ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td><img height="82" src="https://lh6.googleusercontent.com/qTnTpz6-wSkjDTMaxF2jv5BYONpt7e7ThIE9kU5gHPuHsOwOAPx8xzKB4OeY4RmhmxuVLVnSMkshH366TvzVdXAkHL4P9XKsPqf8ngnKk3Jgm9aDuM3jM2jZOsmg4rOsDu0IOzd_" style="border: none; font-family: Arial; font-size: 11pt; margin-left: auto; margin-right: auto; white-space: pre-wrap;" width="535" /></td></tr>
<tr><td class="tr-caption"><b style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 10.56px;">Fig 1: Main Directory</b></td></tr>
</tbody></table>
<ul style="text-align: left;">
<li><span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">Create a module.xml file with the content below inside the main directory.</span></li>
<div dir="ltr" style="margin-left: 40.5pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="439"></col></colgroup><tbody>
<tr style="height: 143.25pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"><?xml version="1.0" encoding="UTF-8"?></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"><module xmlns="urn:jboss:module:1.1" name="com.mysql"></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <resources></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <resource-root path="mysql-connector-java-[VERSION]-bin.jar"/></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> </resources></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <dependencies></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <module name="javax.api"/></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <module name="javax.transaction.api"/></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <module name="javax.servlet.api" optional="true"/></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> </dependencies></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"></module></span></div>
</td></tr>
</tbody></table>
</div>
<li><div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">Access directory $JBOSS_HOME/standalone/configuration and open the file standalone.xml.Till </span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">mysql-connector-java-5.1.47-bin.jar,add the driver like this:</span></div>
<span id="docs-internal-guid-22b8c026-7fff-e97e-cb68-7d04a9aeef9e"><div dir="ltr" style="margin-left: 41.25pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="437"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"><driver name="mysql" module="com.mysql"></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-right: 1.5pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"><driver-class>com.mysql.jdbc.Driver</driver-class></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"><xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"></xa-datasource-class></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"></driver></span></div>
</td></tr>
</tbody></table>
</div>
</span></li>
</ul>
<div style="text-align: left;">
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><a href="https://downloads.mysql.com/archives/c-j/" target="_blank">From mysql-connector-java-6.0.2-bin.jar</a>, the hierarchy of driver classes has been changed </span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">and for those versions you need to add the below mentioned configurations in </span></div>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">standalone.xml to add a driver.</span></div>
</div>
<div style="margin-left: 36pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="451"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"><driver name="mysql" module="com.mysql"></span></div>
<div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <driver-class>com.mysql.cj.jdbc.Driver</driver-class></span></div>
<div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"><xa-datasource-class>com.mysql.cj.jdbc.MysqlXADataSource</xa-datasource-class></span></div>
<div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"></driver></span></div>
</td></tr>
</tbody></table>
</div>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline;">After all the above steps, a new driver will get added in the JBoss Server</span></span></span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"> and need to restart the JBoss Server to see the newly added driver.</span><br />
<div style="margin-left: 0pt; text-align: center;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b><u><br /></u></b></span></div>
<div style="margin-left: 0pt; text-align: center;">
<span id="docs-internal-guid-8b41d419-7fff-8941-1673-f2a7d3592ff7"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b><u>Create JDBC DataSource in JBoss Server.</u></b></span></span></div>
<br />
<ul style="text-align: left;">
<li><span id="docs-internal-guid-8f1e3b7e-7fff-6f20-c207-ef103f33596a"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Go to </span><a href="http://localhost:9990/console/App.html#datasources" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">JBoss Server Datasources</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> .</span></span></li>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="185" src="https://lh5.googleusercontent.com/aTnEzyGwgoGmHM3zfpN7iwhTnDlANWtf-yJen59CtJCiyy_tl5I6-huyLj2f9oWmXgCAbMxrv4N1BqmYZFQN86cPsdo6TPP5Aaszx_eWnwjrC4AgTPFfA1B8X8qRXk0_twatj7WF" style="border: none; margin-left: auto; margin-right: auto;" width="442" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 10.56px;">Fig 2: Add a new JDBC DataSource Attributes</b></td></tr>
</tbody></table>
<li><span style="font-size: 14.6667px; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial";">Click on Add to create a new Datasource.</span></span><span id="docs-internal-guid-6c8b14e1-7fff-30cb-db4b-8188ca341cc7"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span></li>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">It has 3 steps configurations shown below.</span></span></li>
<ul>
<li><span id="docs-internal-guid-fc28ed74-7fff-4226-c8e7-3317f090c7c1"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Step1/3 :DataSource Attributes</span></span></li>
<ul>
<li><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Name: any Name.</span></li>
<li><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">JNDI Name: The jndi name must start with “java:jboss/” and after that you can put anything like java:jboss/test</span></li>
</ul>
</ul>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="255" src="https://lh6.googleusercontent.com/9oDFojspa4DpuVtEjKeWO3YfXfpBDTXaZ1g2brIcfXTCuDzydNoSgF0CK6pfoPi6QbMTuMiMUHFJPQo3DxrX0seymfl3PlEpkxXr9UjKzh49v0cOEJgewof9IadPBqx1BdjtzqxN" style="border: none; margin-left: auto; margin-right: auto;" width="275" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 10.56px;">Fig 3: DataSource Attributes</b></td></tr>
</tbody></table>
<div>
<span id="docs-internal-guid-43dd2768-7fff-ca83-4914-20844ca4ea74"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span></div>
<ul style="text-align: left;"><ul>
<li><b><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">Step</span></span><span id="docs-internal-guid-cd7e6393-7fff-f6d5-a105-fb0afb035541"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> 2/3: JDBC Driver</span></span></b></li>
</ul>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="281" src="https://lh6.googleusercontent.com/vFoEDvcSsZT_HSARlXI_X0zCn0L6nVLdPRcaubPxrMUHswR4hmkHflAQexk6_p486CY4-9obHCMFCreMLsyyI3ZcJ-5fOoaMZFqTv7QUV0Y0_I3q4cIVid5zBqmogWfr0tAY8Y4J" style="border: none; margin-left: auto; margin-right: auto;" width="299" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 10.56px;">Fig 4: JDBC Driver</b></td></tr>
</tbody></table>
<div>
<span id="docs-internal-guid-c52be004-7fff-32a9-4bc2-9ebae0414a59"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span></div>
<ul style="text-align: left;"><ul>
<li><b><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Step 3/3 Connection Settings</span></b></li>
<ul>
<li><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">C</span><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">onnection URL:jdbc:mysql://localhost:3306/sys[here sys is the database name.]</span></span></li>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">Username: the username of the database.
</span></span></li>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">Password: the password of the database</span></span></li>
</ul>
</ul>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="354" src="https://lh5.googleusercontent.com/_KXDX0RWj0jk2nYtWPWtINCd6lWiMPjnfMQGRzFcQuoCeyNPG2XLZyjD3p4I3NbyQQ_ZYmjTtJAod_cu_j4LZCY9PsHlaWCIXIRpcy0faR_PyRl4gE3Q7K4jnQ3XCqQGVv1Kehan" style="border: none; margin-left: auto; margin-right: auto;" width="375" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 10.56px;">Fig 5: Connection Settings</b></td></tr>
</tbody></table>
<div>
<span id="docs-internal-guid-55fafe78-7fff-6d51-da02-a5ba32d7fae7"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span></div>
<span id="docs-internal-guid-683de19f-7fff-ecca-60ee-d878cabc8efc"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-683de19f-7fff-ecca-60ee-d878cabc8efc"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">You can Test the connection by clicking on “<b>Test the connection</b>” button after filling all the above configurations and verify that the database is connected correctly or not.</span></span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b style="background-color: white; color: #222222;"><u><br /></u></b></span>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b style="background-color: white; color: #222222;"><u>Demonstration Video On Add MySQL Driver in JBoss Server:</u></b></span></div>
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/q9bLCP-bH-U" width="560"></iframe>
<span id="docs-internal-guid-683de19f-7fff-ecca-60ee-d878cabc8efc">
</span>
<br />
<div>
<span id="docs-internal-guid-683de19f-7fff-ecca-60ee-d878cabc8efc"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></div>
<span id="docs-internal-guid-683de19f-7fff-ecca-60ee-d878cabc8efc">
</span>
<div style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="background-color: white; color: #222222; font-size: 11pt; vertical-align: baseline;">If you have any query or suggestion then kindly comment or mail us at </span><span style="background-color: white; color: #0b5394; font-size: 9pt; font-weight: 700; vertical-align: baseline;">sgaem.blog02@gmail.com</span></span></span></span></span></span></div>
<br />
<div>
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; white-space: normal;">
<div style="font-family: arial, tahoma, helvetica, freesans, sans-serif; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline;"><span style="font-family: "arial"; font-size: 13.3333px; font-weight: 700; white-space: pre-wrap;">Hope it will help you guys !!</span></span></span></span></span></span></span></div>
<div style="font-family: arial, tahoma, helvetica, freesans, sans-serif; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline;"><span style="font-family: "arial"; font-size: 13.3333px; font-weight: 700; white-space: pre-wrap;">Thanks and Happy Learning.</span></span></span></span></span></span></span></div>
</div>
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline;">
</span></span></span></span></span></span></div>
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span id="docs-internal-guid-ebcd0bee-7fff-cbd1-efff-86307d08735d">
</span>
</span></span></span></span><br />
<div>
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline;"><br /></span></span></span></span></span></div>
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-ef633d4c-7fff-e5b4-dc8b-c45a9ecaf1ba"><span id="docs-internal-guid-c6db3624-7fff-a5af-11b0-24985eed0600">
</span>
</span></span></span><br />
<div style="margin-left: 41.25pt;">
</div>
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">
</span></span></div>
<div style="text-align: left;">
<span id="docs-internal-guid-cc8b7362-7fff-ac28-8649-b1f926b1d3f1">
</span></div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com4tag:blogger.com,1999:blog-7481371294519000730.post-51113840864764057062019-06-30T13:01:00.001+05:302019-06-30T18:54:19.124+05:30Preparing your Spring Boot app to deploy it to JBoss EAP 6.3<div dir="ltr" style="text-align: left;" trbidi="on">
<span id="docs-internal-guid-704f240a-7fff-f29e-ddcc-64f27a7052ca"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6JUW1MotsoVJcV78BmtoSrR51tN66L2eprQpbehWergLfj7EUQXYP-SMjB3WCmsVno5opDRxvMnZoRQBhCWevHm1wnhYvD94hM9nh1O3El77PhvG71XPAYH_4mht-ouiX4bYdVp1K5qIL/s1600/Picture3.png" style="display: none;" />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Hello Everyone,</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-07b0be55-7fff-0789-fc87-5c2705573898"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Being an AEM Developer. You are supposed to know how to use java frameworks. So </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">in </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">my </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">industry experience I got an opportunity to work with spring boot many times. </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Working </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">with spring boot framework is one of the easiest things to do because spring</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">boot applications runs on its own tomcat server and you don't need to have a big setup for </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">this.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-b911729a-7fff-539c-f63d-138a89c2842a"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">But sometimes clients want to deploy spring boot applications in JBoss server and if </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">JBoss server is quite legacy like JBoss EAP 6.3 or older than this then the actual problem </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">starts.</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-b2945d06-7fff-cfdb-a1e4-c4eaec6d9edc"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">So my requirement was client wants me to make a spring boot application which can run on </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">java 7 and 8 and can be deployed over JBoss EAP 6.3.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">As spring boot 2 needs java 8 to run so I am not able to use that so I decided to use spring </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">boot version 1.5.21.RELEASE as it works on both java 7 and 8.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Let’s create a basic Application with spring boot and deploy it in JBoss 6.3. </span><br />
<span style="font-family: arial; font-size: 11pt; white-space: pre;"><b>Prerequisites:</b></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
</div>
<ol style="text-align: left;">
<li><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>Install JBoss EAP 6.3 :</b> You can download JBoss 6.3 installer from </span><a href="https://developers.redhat.com/products/eap/download" style="font-family: Arial; font-size: 11pt; text-decoration-line: none; white-space: pre;"><span style="color: #1155cc; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">here</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">. For step by step procedure to install it in windows, <b>please go through with this video.</b></span></li>
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/Z6H7M0iylas" width="560"></iframe>
<li><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-0e535959-7fff-3f76-dce1-e69bacf33bd6"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><b>Create a sample spring boot project</b>: To create a sample spring boot project, you need to create a project from </span><a href="https://start.spring.io/" style="font-weight: 400; text-decoration-line: none;"><span style="color: #1155cc; font-size: 11pt; vertical-align: baseline;">here</span></a><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 400; vertical-align: baseline;">. You can see the whole video to how to create a spring project and deploy it in JBoss container.</span></span></span></li>
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/ERi71W1GccE" width="560"></iframe>
</ol>
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">Till here, I assume that you are already done with prerequisites and now you need to make a few changes in your spring boot project.</span><br />
<div>
<ol style="text-align: left;">
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><span id="docs-internal-guid-b75dd53c-7fff-f0d8-295e-87611422deb7"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">Let’s create a sample main class and a very basic hello world API here.</span></span></span></span></li>
<script src="https://gist.github.com/sgaem/485c99054f95d6d89cc255270dae0d0e.js"></script>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-81bbf7a1-7fff-1a76-7f53-9c77d975e873"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-15fe2260-7fff-c875-6db4-eeaf211eaf17"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline;">First change the artifact “spring-boot-starter” to “spring-boot-starter-web”, because to create API we need “spring-boot-starter-web” dependency and web jar also contain the “spring-boot-starter jar in itself.So to avoid duplicacy we need to do it.</span></span> You need to deploy this application in JBoss container so you need to exclude tomcat dependency from your main spring boot starter web jar.</span></span></span></span></span><div style="margin-left: 36pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="420"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-color: rgb(0, 0, 0); border-style: solid; border-width: 1pt; padding: 5pt; vertical-align: top;"><div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"><dependency></span></div>
<div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <groupId>org.springframework.boot</groupId></span></div>
<div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <artifactId>spring-boot-starter-web</artifactId></span></div>
<div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <exclusions></span></div>
<div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <exclusion></span></div>
<div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <groupId>org.springframework.boot</groupId></span></div>
<div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <artifactId>spring-boot-starter-tomcat</artifactId></span></div>
<div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> </exclusion></span></div>
<div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> </exclusions></span></div>
<div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"></dependency></span></div>
</td></tr>
</tbody></table>
</div>
</li>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span id="docs-internal-guid-71017531-7fff-7ea8-f1ba-5da5de51b286"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">As javax.servlet dependency was the part of tomcat API and in step 2 we have already excluded tomcat dependency, so we need to add this dependency externally only for compile time as JBoss also has this dependency so at run-time JBoss will take care of it.</span></span></span></span></span></span></li>
<div dir="ltr" style="margin-left: 36pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="350"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"><dependency></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <groupId>javax.servlet</groupId></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <artifactId>servlet-api</artifactId></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <version>2.5</version></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <scope>provided</scope></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"></dependency></span></div>
</td></tr>
</tbody></table>
</div>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">Add </span></span></span> server.servlet-path=/* in application.properties file.</span></span></li>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">To deploy it in JBoss container, we need to make a war for the project. To do that we need to add</span></span> :<packaging>war</packaging></li>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;"><b>Define context root</b>:There are many ways to decide the context root of application in JBoss container.</span></span></li>
<ul>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">Add <finalName> xyz</finalName> in pom.xml inside <build> tag.</span></span></li>
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">Add jboss-web.xml inside project directory/webapp/WEB-INF/jboss-web.xml and add this line in the xml file.</span></span><span id="docs-internal-guid-c9243440-7fff-25b4-05e2-4089ab37be8b"><div dir="ltr" style="margin-left: 72pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="283"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"><jboss-web></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <context-root>/xyz</context-root></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"></jboss-web</span></div>
</td></tr>
</tbody></table>
</div>
</span></li>
</ul>
</ol>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">That’s all you need to do after that just run the maven command “mvn clean package” and deploy it in the JBoss container.</span></div>
<div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">After you follow the above steps and deploy the application in JBoss, the very first issue comes to you which is:</span><br />
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><b>Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018104: Deployment error processing SCI for jar: logback-classic-1.1.11.jar</b></span></div>
<div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">To solve this issue, you need to exclude the logback dependency from spring boot starter web dependency. Add this exclusion also in step 2 exclusions list.</span></div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="360"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-color: rgb(0, 0, 0); border-style: solid; border-width: 1pt; padding: 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"><exclusion></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <groupId>ch.qos.logback</groupId></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> <artifactId>logback-classic</artifactId></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"></exclusion></span></div>
</td></tr>
</tbody></table>
</div>
<div>
<span id="docs-internal-guid-1ffa2245-7fff-3490-a5fb-19c8f317a0db"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-1ffa2245-7fff-3490-a5fb-19c8f317a0db"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">After this you again deploy the application in JBoss container and hit the servlet to see the result.</span></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img height="106" src="https://lh5.googleusercontent.com/ngDcQjFu1FGddm1QZoNstKXQuqJ686qRCi_HNPPonL3EtuJRXy1kiSfElS_Tzsx2PJ0pfVh5M1gE0gsRqULj9KJ4LIHYwAqqVijt43iHdKmYWodpbHn5GuJ7hgcU-vSM4iALBX01" style="border: none; font-family: arial; font-size: 11pt; margin-left: auto; margin-right: auto; white-space: pre-wrap;" width="503" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Fig 1: Test your sample API</b></td></tr>
</tbody></table>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-fa1d6fdc-7fff-755c-86a3-5950645fc91f"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline;"></span></span><span id="docs-internal-guid-380feedc-7fff-9925-10e3-b8974b6de11c"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline;"></span></span></span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>Note</b>: To see the <a href="http://localhost:9990/console/App.html#deployments" target="_blank">admin console,</a> JBoss Default Port is 9990 but to view the application the default port is 8080. So you will be able to see the API when you hit localhost:8080/context-root/API_URL</span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><b>Note</b>: The location of server.log file is JBOSS_HOME/standalone/log/server.log.</span><br />
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<br />
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-7d44ec52-7fff-4ba8-91df-724bd57fa5c3"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">If you have any query or suggestion then kindly comment or mail us at </span><span style="color: #0b5394; font-family: "arial"; font-size: 9pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">sgaem.blog02@gmail.com</span></span></div>
<span id="docs-internal-guid-7d44ec52-7fff-4ba8-91df-724bd57fa5c3"></span></div>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">
<div dir="ltr" style="font-family: arial, tahoma, helvetica, freesans, sans-serif; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 13.3333px; font-weight: 700; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="font-family: arial, tahoma, helvetica, freesans, sans-serif; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 13.3333px; font-weight: 700; white-space: pre-wrap;">Hope it will help you guys !!</span></div>
<div dir="ltr" style="font-family: arial, tahoma, helvetica, freesans, sans-serif; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 13.3333px; font-weight: 700; white-space: pre-wrap;">Thanks and Happy Learning.</span></div>
</div>
</div>
<div dir="ltr" style="margin-left: 36pt;">
<span id="docs-internal-guid-ad99539d-7fff-88d4-0339-be5d063c040d"><span id="docs-internal-guid-403d5ee1-7fff-7000-a12e-66af47fb5954">
</span></span></div>
<span id="docs-internal-guid-ad99539d-7fff-88d4-0339-be5d063c040d">
</span></div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com7tag:blogger.com,1999:blog-7481371294519000730.post-8216506258028505042019-05-30T09:31:00.001+05:302019-10-23T08:15:35.034+05:30Export Experience Fragments to Adobe Target with AEM 6.3<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: arial; font-size: 14.6667px; white-space: pre-wrap;">Hello Everyone.</span><span id="docs-internal-guid-fa348322-7fff-d9da-c3ee-55876749ad72"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="background-color: white; color: #222222; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13.2px; white-space: normal;"><br /></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Recently I have gone through one use case of XF with adobe target. The problem statement </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">was I was having one component which is having three variations. And I want to show </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">different variations of the component to different audience using adobe Target.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">So when i start implementing, I came to know that one way to achieve this is to create an XF</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">and make three variations of that and Export it to Adobe Target.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">So This blog only talks about how to Export the Experience Fragment to adobe target.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-e5d3a4cc-7fff-1144-85e3-5ce4b2e59cb8"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b><br /></b></span>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Prerequisites</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">1. AEM needs to be successfully connected to “Adobe Target”.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">2. </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">In the cloud configurations of XF (in page properties), need to configure adobe target.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-d56eb0a4-7fff-a0b7-0e83-a3a0fbe940c3"></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">In the previous blog we have already created an XF and in AEM 6.4 there is already </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">a button available in the XF Console and it will directly publish the XF to target.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">But My project is using AEM 6.3.2.2 Version, I was not able to find the option of "Export to </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Target".</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">But when I upgraded my system to AEM 6.3.3 then I got the option.But the client </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">was not always ready about this upgrade so how can we do it with minimal things done </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">on production.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-886feaad-7fff-89c8-fd8c-d781b553e023"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">While debugging this problem, I have gone through few documents that says different things and really a bit mislead me.</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">1. </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> </span><a href="https://docs.adobe.com/content/help/en/target/using/experiences/offers/aem-experience-fragments.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">One document</span></a><a href="https://docs.adobe.com/content/help/en/target/using/experiences/offers/aem-experience-fragments.html." style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> </span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">says that the prerequisite for this option need to be “Adobe Experience Manager 6.3 SP2 (or later)”.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">2. </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Someone also face the same issue and raise it to </span><a href="https://forums.adobe.com/thread/2516386" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">adobe forum</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> then they ask to update the instance (AEM 6.3.2) with one pack “</span><span style="background-color: white; font-family: "arial"; font-size: 12pt; vertical-align: baseline; white-space: pre-wrap;">cq-6.3.0-featurepack-24640-1.2.zip</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">” and in the forum they mentioned also that “Open a daycare ticket to get access to it. It's not yet available at Adobe Package share cloud”.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">3. </span><a href="https://helpx.adobe.com/experience-manager/6-3/sites/administering/using/experience-fragments-target.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Other document </span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">says that “This functionality requires the application of </span><a href="https://helpx.adobe.com/experience-manager/6-3/release-notes/sp3-release-notes.html" style="text-decoration-line: none;"><span style="color: black; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">AEM 6.3 Service Pack 3 (6.3.3.0)</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-2d2356e7-7fff-f48a-62d4-473366ce4f06"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Now the actual things which I figured out are:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">1. </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">AEM 6.3.2.2 don’t support XF "Export to Adobe Target" option.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">2.</span><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">“cq-6.3.0-featurepack-24640-1.2.zip” package is a very small bug fix package and can solve the problem but it is available in packageshare. No need to raise a ticket to adobe.</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 14.6667px; white-space: pre-wrap;">3. </span> <span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">AEM 6.3.3+ versions supports the option but you can make it available in AEM 6.3.2 with a very small(2 MB) Bug fix package but your client doesn't want to go for the big upgrade. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">
<span id="docs-internal-guid-7d44ec52-7fff-4ba8-91df-724bd57fa5c3"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-7d44ec52-7fff-4ba8-91df-724bd57fa5c3"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">If you have any query or suggestion then kindly comment or mail us at </span><span style="color: #0b5394; font-family: "arial"; font-size: 9pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">sgaem.blog02@gmail.com</span></span></div>
<span id="docs-internal-guid-7d44ec52-7fff-4ba8-91df-724bd57fa5c3">
</span></div>
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">
<div dir="ltr" style="font-family: arial, tahoma, helvetica, freesans, sans-serif; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 13.3333px; font-weight: 700; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="font-family: arial, tahoma, helvetica, freesans, sans-serif; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 13.3333px; font-weight: 700; white-space: pre-wrap;">Hope it will help you guys !!</span></div>
<div dir="ltr" style="font-family: arial, tahoma, helvetica, freesans, sans-serif; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 13.3333px; font-weight: 700; white-space: pre-wrap;">Thanks and Happy Learning.</span></div>
</div>
<div>
<br /></div>
<div>
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
</div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com0tag:blogger.com,1999:blog-7481371294519000730.post-75318406726723687772019-05-30T09:00:00.001+05:302019-12-29T19:33:49.959+05:30Experience Fragments in AEM 6.4<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: arial; font-size: 11pt; white-space: pre;">Hello Everyone,</span><span id="docs-internal-guid-eb136783-7fff-4a83-8aa8-c84285f8b983"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-b93cf74a-7fff-5c96-1179-df9e91378880"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">A lot of people asked me to write upon experience fragments since so long but I couldn’t </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">write over it because before this I have not worked on it. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-21fa0521-7fff-cd11-f2a8-9f4f3fde3dad"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">By writing something after reading from google doesn’t experience you the real time problems </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">you may face.So finally as I am using this feature in my projects and understand the </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">technical challenge also, So for your reference I am writing down this article on experience </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">fragments.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">What are Experience Fragments?</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-10acde74-7fff-73c9-961e-7ea148f3267a"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">An Experience Fragment is a set of content that grouped forms an experience that should </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">make sense on its own.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-81399a40-7fff-c82b-2412-e69abd944be9"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">We will not do our hands on </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">we-retail</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> because that won’t really help you to create your </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">XF so let’s see how you can do initial set up for XF in your own projects.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Prerequisites: </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-0709b8fc-7fff-161f-cf29-6266752b7149"></span></span></div>
<ol style="text-align: left;">
<li><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Page Component of Experience fragments</span></li>
<li><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Creating Dynamic Template for Experience fragments</span></li>
</ol>
<div>
<span id="docs-internal-guid-5b1b7a70-7fff-ad0f-a7ad-3633acddcfed"><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">How to create a Page Component for XF:</span></span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"> </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">Copy the we-retail page Component “weretail/components/structure/xfpage” in your own project and change the clientlibs in “customfooterlibs.html” and “customheaderlibs.html”,and include your own clientlibs.It is important because if you create an XF for your project and use the components you want to see the same look and feel of the actual website in XF pages also.</span><br />
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial"; font-size: 11pt; font-weight: 700; white-space: pre-wrap;">Dynamic Templates for Experience Fragments:</span></div>
<div>
<span id="docs-internal-guid-bd223fae-7fff-34f8-3239-6bdd8cc0b295">
</span>
<br />
<div>
<span id="docs-internal-guid-bd223fae-7fff-34f8-3239-6bdd8cc0b295"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">If you are already using dynamic templates, you must be aware about it so create a new template-types with your xf resourcetype.</span></span></div>
<span id="docs-internal-guid-bd223fae-7fff-34f8-3239-6bdd8cc0b295">
</span>
<br />
<div>
<span id="docs-internal-guid-bd223fae-7fff-34f8-3239-6bdd8cc0b295"><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">If in your project you are using static templates, still you need to create a dynamic template </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">for XF. To check the steps of creating a dynamic template you can check this link out from </span><a href="http://www.sgaemsolutions.com/2017/09/dynamic-editable-templates-in-aem-63.html" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">here</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> or no need to understand the dynamic templates in so deep just take the package from <a href="https://drive.google.com/file/d/1gcZ0Esha6gOQyXw0Q78P7GppLsTLJ_k6/view?usp=sharing" target="_blank">here </a>and update the name and path as per your needs.</span></span></div>
<span id="docs-internal-guid-bd223fae-7fff-34f8-3239-6bdd8cc0b295">
</span>
<br />
<div>
<span id="docs-internal-guid-bd223fae-7fff-34f8-3239-6bdd8cc0b295"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;"><br /></span></span></span></div>
<span id="docs-internal-guid-bd223fae-7fff-34f8-3239-6bdd8cc0b295">
</span>
<br />
<div>
<span id="docs-internal-guid-bd223fae-7fff-34f8-3239-6bdd8cc0b295"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span id="docs-internal-guid-44a8d9ec-7fff-a836-9a8a-8b912771827f"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">Note</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">: One important thing to highlight here is you need to add one more property in the “</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">jcr:content</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">” of “</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline;">initial</span><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;">” node of your template-type manually which is </span></span></span></span></div>
<span id="docs-internal-guid-bd223fae-7fff-34f8-3239-6bdd8cc0b295">
</span>
<div>
<span id="docs-internal-guid-bd223fae-7fff-34f8-3239-6bdd8cc0b295"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline;"><br /></span></span></span></div>
<span id="docs-internal-guid-bd223fae-7fff-34f8-3239-6bdd8cc0b295">
<div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="157"></col><col width="90"></col><col width="73"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">cq:xfVarientType</span></div>
</td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">String </span></div>
</td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">web</span></div>
</td></tr>
</tbody></table>
</div>
</div>
</span><span id="docs-internal-guid-459cb7ac-7fff-648e-fea7-3e9a13a29339"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
</span></div>
<div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If you don’t add this property you won’t able to see your XF Variant in the </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">experience fragment component to select it over a page.</span></div>
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">So my assumption till here is that you have created a template-types and page component. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">It's time to create a template from template-types and allow the components in parsys by </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">adding policy and unlock the parsys.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">If you are completely unaware of dynamic templates you can follow the video for more </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">clarity if the terminologies (policy, template-types) are not clear to you.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span id="docs-internal-guid-9942dcad-7fff-1f2b-efc3-0cfe1dd5537e"></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Allow the template for Experience Fragment: </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">You need to add your template </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">manually in XF path(“</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">/content/experience-fragments”</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">) property allowedTemplates, </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">so that template can be visible to create XF.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Now it’s time to create Experience Fragments:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">1. Go to </span><a href="http://localhost:4502/aem/start" style="font-family: Arial; font-size: 11pt; text-decoration-line: none; white-space: pre;"><span style="color: #1155cc; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">AEM Start</span></a><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> Console and go to </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">“Experience Fragments”</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">2. Create a folder for your project. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">3. Under that click on Create-> Experience Fragment and choose the template for your project.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">4. </span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">When you open the template you will be able to see a parsys in which you can drag and drop the components.Only those components can be dropped here which you configured in the policy of parsys at the time of template creation.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">5.</span><span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">You can create different variation of the XF also.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-07fb7a1a-7fff-8587-b3d3-5a981672fe97"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Now your Experience Fragment is ready, you can use it in your page.Drag and drop the Component named </span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">“experience Fragment” </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">from</span><span style="font-family: "arial"; font-size: 11pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"> "General" </span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">group</span><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> on a page and choose the variation which you want to use on a page. </span></span></div>
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">
<span id="docs-internal-guid-7d44ec52-7fff-4ba8-91df-724bd57fa5c3"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-7d44ec52-7fff-4ba8-91df-724bd57fa5c3"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></div>
<span id="docs-internal-guid-7d44ec52-7fff-4ba8-91df-724bd57fa5c3">
</span>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-7d44ec52-7fff-4ba8-91df-724bd57fa5c3"><span style="font-family: "arial"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">If you have any query or suggestion then kindly comment or mail us at </span><span style="color: #0b5394; font-family: "arial"; font-size: 9pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">sgaem.blog02@gmail.com</span></span></div>
<span id="docs-internal-guid-7d44ec52-7fff-4ba8-91df-724bd57fa5c3">
</span></div>
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">
<div dir="ltr" style="font-family: arial, tahoma, helvetica, freesans, sans-serif; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 13.3333px; font-weight: 700; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="font-family: arial, tahoma, helvetica, freesans, sans-serif; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 13.3333px; font-weight: 700; white-space: pre-wrap;">Hope it will help you guys !!</span></div>
<div dir="ltr" style="font-family: arial, tahoma, helvetica, freesans, sans-serif; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 13.3333px; font-weight: 700; white-space: pre-wrap;">Thanks and Happy Learning.</span></div>
</div>
</div>
</div>
Shivani Garghttp://www.blogger.com/profile/00055023687977535791noreply@blogger.com3