Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AnkitCh
Community profile AnkitCh Level 2
Job title here
Location here
6 BADGES
Level 2

Level 2

Learn more
Joined the community 09-04-2013 4:00:44 PM
Offline
Top badges earned by AnkitCh
Customize the badges you want to showcase on your profile
fetching properties of OSGi service in java class
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi,I have created a node of type sling:OsgiConfig and have inserted a property 'propertyPath' which is of type String[]. I can access this in my component JSP using:Configuration conf = sling.getService(org.osgi.service.cm.ConfigurationAdmin.class).getConfiguration("Name of the config"); String[] myProp = (String[]) conf.getProperties().get("propertyPath");How can I do the same in a java class. I want to make a method in java class that I would call from my JSP. I am doing this using taglib. How...

Views

604

Likes

0

Replies

1
Re: QueryBuilder or fetching the pages and then Iterating
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Thanks for the reply Anwar. Looks like this should help.

Views

338

Likes

0

Replies

0
Re: QueryBuilder or fetching the pages and then Iterating
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi Anwar,Thank you for your response. I would also like to let you know that it is possible that the author may not select that custom page property on article page. So, the logic has to be something like check for all the pages that have the custom page property selected by author and then sort it as per replicated date and then return the one with the latest replicated date. In case the user has not selected the custom page property on any of the pages we need to return the page with latest re...

Views

338

Likes

0

Replies

0
QueryBuilder or fetching the pages and then Iterating
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi,I have a requirement wherein I need to search for article pages of a specific type under 6 different paths. The pages belonging to 6 different paths are of same type in a way that they are using same template. Their respective parent pages are also using the same template but they differ based on specific custom page property that we are setting. The detailed pages are further characterized by custom page properties. So based on these custom page properties and latest replication date I have ...

Views

630

Likes

0

Replies

4
Re: sort pages by cq:lastReplicated
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Thank you for your inputs Justin, I had thought of this option earlier but did not look much further into this since I was not sure how to write a comparator for this. So was looking for something CQ specific if it has any. However, do you have any pointers on the first point ?Ankit

Views

419

Likes

0

Replies

0
Re: sort pages by cq:lastReplicated
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi Jitendra,Thank you for your inputs.1) I want to fetch the pages based on three properties as well. cq:template, a custom page property and offTime.2) How do I just sort a list if I already have a list of cq:pages and all I am looking for is just the sorting part.Thanks in advance,Ankit

Views

426

Likes

0

Replies

0
sort pages by cq:lastReplicated
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi All,I am using cq 5.6.1 and I need to sort a list of cq:Page by cq:lastReplicated date property. I want to know whats the best possible way. Also, I need to do this sorting in java class.Thanks in advance,Ankit

Views

1.1K

Likes

0

Replies

5
Re: Creating multidomain CQ mapping
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Yes Sham the requirement is that I am trying to map www.mercer.com to /content/mercer/en. Once this is confirmed I will create rest of the mappings. Let me know if this is ok.

Views

537

Like

1

Replies

0
Re: Creating multidomain CQ mapping
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Thanks Sham. I have kept the file at https://sendnow.acrobat.com/?i=Ul7zg4ps0coJyUCodjsAYA

Views

531

Like

1

Replies

0
Re: Creating multidomain CQ mapping
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
It's not letting me attach the zip package file. However, let me iterate the requirement. So, inside the /content/mercer folder we have multiple language folders like en, fr, de etc. What I am looking for is, to map insights.mercer.com/en to content/mercer/en and insights.mercer.com/fr to content/mercer/fr and so on. How do I achieve this ?Thanks,Ankit

Views

533

Likes

0

Replies

0
Creating multidomain CQ mapping
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi,I am using CQ 5.6.1 and trying to create multi-domain CQ mappings for our website and I have already went through the following URLs:http://www.cognifide.com/blogs/cq/multidomain-cq-mappings-and-apache-configuration/http://www.wemblog.com/2013/03/how-to-manage-multi-site-using.htmlhttp://helpx.adobe.com/cq/kb/HowToMapDomains.html but not able to do so. My folder exists as /content/mercer and has further language folders like en, fr etc. I have attached the etc.mapping package. Also, this is t...

Views

2.1K

Like

1

Replies

9
CQ5 timezone issue
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi,I am facing an issue with setting time on page properties on CQ 5.6.1. The time being set into the JCR is getting converted to the timezone that is set in author’s machine. For example: time being set when author is in India is saved as +5:30 while in NY it is being set with -4:00 offset. Is there any way this can be fixed ?Thanks !Ankit

Views

278

Likes

0

Replies

1
AJAX on Publisher - CQ 5.6.1
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi,I am making an AJAX call to a sling servlet on CQ 5.6.1 using the path /bin/fetchlisting like below:@SlingServlet(paths="/bin/fetchlisting",methods = "POST",metatype=true)public class RetrieveListingServlet extends SlingAllMethodsServlet {The call is being made from javascript like this:$.ajax({type : 'POST',url : '/bin/fetchlisting',On author the Ajax call is getting executed just fine but on publisher I am getting an error /bin/fetchlisting 404 Not found.Any help is much appreciated !Thanks

Views

319

Likes

0

Replies

3
Re: Error during include of component
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
I have been able to resolve this now. I tried everything but nothing worked. So I had to replace the trunk in my code with the branch. Anyway, thanks for all the inputs. Learned something new !Regards,Ankit

Views

699

Likes

0

Replies

0
Re: Error during include of component
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Thank you for the detailed response and I am already using maven to build the OSGi bundles. The problem is it was working fine till a couple of days before, not sure what exactly went wrong. I am using eclipse as the IDE and maven to build the project.Also, while I am building the project I am getting the following warnings:dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: javax.servlet.jsp:jsp-api:jar -> version 2.1 vs (?) @ line 169, column 15'dependencies.dependenc...

Views

725

Likes

0

Replies

0
Re: Error during include of component
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Thanks for the response smacdonald2008. But how do I check that.

Views

853

Likes

0

Replies

0
Error during include of component
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi All,Suddenly I have started getting this error on my page. Below are some more details on the error.Error Message: org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.jsp.jasper.JasperException: The absolute uri: http://www.mercer.com/taglibs/mhrtaglib/1.0 cannot be resolved in either web.xml or the jar files deployed with this applicationHere is my sample JSP<%@include file="/libs/foundation/global.jsp" %> <%@taglib prefix="mhr" uri="http://www.mercer.com/tag...

Views

3.2K

Likes

0

Replies

6
Re: getting "The import com.day.cq.wcm.api cannot be resolved" in eclipse workspace
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi Pawan,Thanks a lot. I have been able to sort that out. BTW, eclipse acted funny. For the [1] I just restarted it and all the errors were gone. Regards,Ankit

Views

1.5K

Likes

0

Replies

0
getting "The import com.day.cq.wcm.api cannot be resolved" in eclipse workspace
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi All,1) I have set up the eclipse workspace for CQ and just started doing some code. I am using and import on my java file import com.day.cq.wcm.api.Page; on which I am getting an error "The import com.day.cq.wcm.api cannot be resolved". Is there any dependency I will have to define for this in the pom.xml file. I have already defined : com.day.cq cq-commons 5.6.2 provided com.day.cq.wcm cq-wcm-commons 5.6.2 provided com.day.cq.wcm cq-wcm-api 5.6.2 provided but no luck yet.2) There's anoth...

Views

2.8K

Likes

0

Replies

3
Re: CQ5 - eclipse and maven setup
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Yes, I have them in my pom.xml like this: adobe Adobe Public Repository http://repo.adobe.com/nexus/content/groups/public/ default adobe Adobe Public Repository http://repo.adobe.com/nexus/content/groups/public/ default

Views

303

Likes

0

Replies

0
Re: CQ5 - eclipse and maven setup
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi HTH,I am already using this dependency though with a different version: com.day.cq cq-commons 5.6.2 provided Do you think version make a difference? Also, for your reference I am including the whole set of dependencies I am using: org.osgi org.osgi.core 4.2.0 provided org.osgi org.osgi.compendium 4.2.0 provided org.apache.felix org.apache.felix.scr.annotations 1.6.0 provided biz.aQute bndlib 1.43.0 provided org.slf4j slf4j-api 1.5.10 provided javax.servlet servlet-api 2.5 provided ...

Views

278

Likes

0

Replies

0
Re: CQ5 - eclipse and maven setup
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi HTH,Thank you for your response. I have gone through that already and used the dependency the same way as in the link you sent. I am not able to understand what more dependency I need to use. I used CQ in-built dependency checker to determine the dependency of com.day.cq.wcm.api. Declared it and then trying to compile my code. Do let me know if I need to provide some further information.Regards,Ankit

Views

303

Likes

0

Replies

0
CQ5 - eclipse and maven setup
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi All,I have setup my CQ workspace in eclipse and using maven to build the project. I am trying to compile a test java file:package com.mercer.taglibs.tags; import com.day.cq.wcm.api.Page; public class HelloPerson { private Page personPage; public static final String PN_PERSON_NAME = "personName"; public HelloPerson(Page personPage) { this.personPage = personPage; } public String getHelloMessage() { String personName = personPage.getProperties().get(PN_PERSON_NAME).toString(); return personName...

Views

855

Likes

0

Replies

8
Re: autocomplete in JSP - CQ on eclipse
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Thanks for you response Yogesh. I just validated the jsp file and getting an error "Fragment "/apps/mercer/components/common/global.jsp" was not found at expected path /MMC/apps/ mercer/components/common/global.jsp"Is there anyways I can fix this.I am also getting error "currentPage cannot be resolved" on the below lines:Locale pageLocale = currentPage.getLanguage(false); slingRequest.getResourceBundle("insights",pageLocale).getString("hello")Any help is appreciated.Thanks.

Views

633

Likes

0

Replies

0
Re: autocomplete in JSP - CQ on eclipse
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi Bruce,I just copied global.jsp from /libs/foundation. But it is still giving errors. However, I have one more thought going on in my mind. Since the APIs used here in this code are all CQ related and this is more of an environment related issue, and hence should work fine in your regular CQ environment. What is your take on this ?Thanks,Ankit

Views

634

Likes

0

Replies

0
Re: autocomplete in JSP - CQ on eclipse
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
What I sometimes do is to reference the global.jsp via ../../ instead of /libs/ etc.Can you try this?What I sometimes do is to reference the global.jsp via ../../ instead of /libs/ etc.Can you try this? This did the trick. Thanks for the response.Ankit

Views

637

Like

1

Replies

0
autocomplete in JSP - CQ on eclipse
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi,I am trying to achieve autocomplete feature on JSP in eclipse. I have followed the page http://dev.day.com/docs/en/cq/aem-how-tos/development/howto-develop-aem-projects-using-eclipse.html but still not able to accomplish. Here is a sample jsp I have prepared :<%@ include file="/libs/foundation/global.jsp"%><% %><%@ page import="javax.jcr.*, org.apache.sling.api.resource.Resource, java.util.logging.Logger,java.util.Locale" %> <%@ taglib prefix="ex" uri="http://www.mercer.com/taglibs/mhrtaglib/ -->...

Views

2.0K

Likes

2

Replies

7
Re: Not being able to map Sling Servlet to a URL in CQ5.6
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Scott, I am not trying to map any JSP to the servlet. All I am trying to do is access a page http://localhost:4502/cf#/insights and want that when this page is hit the control should go the servlet. I have mapped /insights to the servelet using path attribute. Please let me know if what I am trying to do is correct or not. Also, to answer your question, I need to add "org.json.simple.parser" to the export package. But since I am using eclipse for development and maven to build the project, I am ...

Views

503

Likes

0

Replies

0
Re: Not being able to map Sling Servlet to a URL in CQ5.6
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi Scott,Thank you for the response and I am doing exactly that. The path I have included in my Servlet is exactly the same as that of the page I access. Please see.Ankit.

Views

481

Likes

0

Replies

0
Not being able to map Sling Servlet to a URL in CQ5.6
Avatar
Validate 10
Level 2
AnkitCh
Level 2

Likes

7 likes

Total Posts

41 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
AnkitCh
- Adobe Experience Manager
Hi,I have created a test sling servlet as shown below:package com.mercer.servlets; import org.apache.felix.scr.annotations.sling.SlingServlet; import org.apache.sling.api.SlingHttpServletRequest; import org.apache.sling.api.SlingHttpServletResponse; import org.apache.sling.api.servlets.SlingAllMethodsServlet; import javax.servlet.ServletException; import java.io.IOException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SlingServlet(paths="/insights", methods = "GET", metatype=true) ...

Views

1.8K

Like

1

Replies

8