Questions tagged [sling]

Apache Sling is a web framework that uses Java Content Repository to store and manage content. It also uses OSGi (Apache Felix) for dynamic loading.

Description

Apache Sling is a web framework that uses a Java Content Repository , such as Apache Jackrabbit , to store and manage content.

Sling applications use either scripts or Java servlets, selected based on simple name conventions, to process HTTP requests in a RESTful way.

The embedded Apache Felix OSGi framework and console provide a dynamic runtime environment, where code and content bundles can be loaded, unloaded and reconfigured at runtime.

As the first web framework dedicated to JSR-170 Java Content Repositories, Sling makes it very simple to implement simple applications, while providing an enterprise-level framework for more complex applications.

Links

863 questions
0
votes
1 answer

getAnonymousResolver: Anonymous access not allowed by configuration - requesting credentials

I am using CQ5.6 and making a servlet call from a service. In my error log I get "java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:4502/content/sports/jcr:content/parSports/sportsscores.scores" from a log…
mitchj
  • 623
  • 4
  • 9
  • 16
0
votes
1 answer

Migrating package to AEM 6. javax.jcr.nodetype.ConstraintViolationException: Item is protected

I have a package built on AEM 5.6.1 and I've tested that it works as expected. However, when I try to deploy it in AEM 6, I get the following error: Caused by: javax.jcr.nodetype.ConstraintViolationException: Item is protected. at…
birdy
  • 9,286
  • 24
  • 107
  • 171
0
votes
1 answer

AEM CQ5 sling mapping how to go back to http

I have SSL setup on a server. Using sling:Mappinng I can serve forms over https. However after user visited any of the forms they remain using site over https. How can I make sure that only forms are served over https and rest of the site over…
blueby
  • 71
  • 2
  • 9
0
votes
1 answer

Suppressing/handling errors from a sling:include

I have a SlingServlet that implements a JSON query service (very similar to the AEM Query Builder servlet). It creates a SyntheticResource to respond with a JSP "view", which is the JSON to be served. This JSP uses a to include each result…
Dave Hughes
  • 352
  • 4
  • 21
0
votes
1 answer

Issue with importing JcrTagImpl class in OSGI

I need to import JcrTagImpl class which is located in CQ Day Communique 5 Tagging jar file(com.day.cq.cq-tagging) Then I tried to add the above jar in my pom.xml's dependency as below then I can import the whole package as…
ezhil
  • 977
  • 6
  • 15
  • 36
0
votes
2 answers

How to mock sling PropertyIterator?

I have following code to test: static Set methodToTest(Node crxProductNode, OfflineNodeAction nodeAction, Set allowedAttributes) throws RepositoryException { Set changedPropertiesKeys = new HashSet(); …
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
1 answer

Sling Remote Junit Test Case

I'm trying to execute a JUnit test remotely on an Adobe AEM instance, using the JUnit Servlet. Post for reference: Which Testing framework will suit for Adobe CQ5 Project? I've defined my testcase and was expecting to be able to see it at this URL…
mish
  • 1,055
  • 10
  • 29
0
votes
2 answers

How to create a new property to an existing node using sling servlet?

I have a assignment in Sling Servlets. Here, In my application, I've to create a property within the node corresponding to logged in user and add a boolean value to this property. This has to be done dynamically when the user logs in for the first…
Suban Jacob
  • 11
  • 1
  • 4
0
votes
3 answers

AEM:OSGI sling service activate method not being executed

I am trying to create a very basic sling service in AEM: package com.mypackage; /** * A simple service interface */ public interface TestService { /** * @return the name of the underlying JCR repository implementation */ public…
user972418
  • 817
  • 3
  • 25
  • 58
0
votes
1 answer

sling servlet giving error when called from cq5 dialog for dynamic select dropdown

I created a servlet that returns a JSON containing options to add in a dropdown. I set this servlet's path using the options parameter under the node. The servlet is called by the dropdown. I can also test it manually via the URL:…
asn
  • 41
  • 2
0
votes
1 answer

Using PageManager API in AEM6/CQ5

My requirement is to iterate over 8000 nodes in the JCR and create a Page object in Java for each node using PageManager API. To start with I am using PageManager to get the title of a Page as below. public String currentPageTitle(String pagePath)…
Esha Ch
  • 13
  • 1
  • 5
0
votes
2 answers

calling a sling service on ajax call

I have written a Email Exchange service in my local and deployed it as a bundle into AEM6.So my service is available now as an sling service. I have consumed it in my jsp as follows. EmailService es - sling.getService(EmailService.class); But now in…
Esha Ch
  • 13
  • 1
  • 5
0
votes
1 answer

Open source equivalent to CRXDE Lite for Jackrabbit

Is there an open source equivalent to Adobe/Day's CRXDE Lite that can be used with the Sling Launchpad?
SlingNewbie
  • 11
  • 1
  • 4
0
votes
1 answer

Create a node from within JSP using Sling API

I'm just getting started with Sling Launchpad and have grasped the basic concepts of selectors and so forth and have been able to read the contents of nodes. However, I can't figure out how to create a new node. I have a JSP in my jackrabbit…
SlingNewbie
  • 11
  • 1
  • 4
0
votes
1 answer

Multiple sling configs with same name

If there are multiple sling configuration nodes with the same name in CRX and if I invoke configAdmin.getConfiguration in my OSGi Service, which config value would it pick? I have mulitple config directories under apps like config.qa, config.local,…
Suneel
  • 817
  • 3
  • 10
  • 23