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
6
votes
1 answer

How does Apache Sling script resolving rules work?

I have page with name tst in content whose sling:resourceType = news-portal/pages/test page structure (under the /apps): test has sling:resourceSuperType = news-portal/pages/news-repo-main-page in browser I type following…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
5
votes
1 answer

How to debug Groovy code via the remote Java application debugging in Eclipse

I'm struggling to debug an application that builds as a Sling bundle. The application is almost entirely Groovy code (I have the Groovy Eclipse plug-in), and Eclipse (using Maven) is building the .jar and installing it in Sling without any…
Nick Golding
  • 53
  • 1
  • 6
5
votes
2 answers

How to hide embedded dependencies when using an OSGI bundle with maven?

Is there a way to use an OSGI bundle as a maven dependency without getting all the packages from it into the classpath that it doesn't even export? Background of the question: We just added the org.apache.sling.xss bundle as a maven dependency into…
Dr. Hans-Peter Störr
  • 25,298
  • 30
  • 102
  • 139
5
votes
1 answer

Sling @Inject NullPointerError, When @Reference Successful

When trying to @Inject (javax.inject.Inject) to inject MyConfigurationService within @SlingServlet MyServlet leads to a NullPointerError anytime any operations are attempted on myConfigurationService within an AEM OSGi container using Maven…
Alexander Staroselsky
  • 37,209
  • 15
  • 79
  • 91
5
votes
1 answer

AEM Resources missing sling:resourceType

My content repository over a 2 year span has accumulated many obsolete component resources. The component nodes are missing sling:resourceType property. These component nodes looks like this: Due to such bad resources, the page is throwing below…
Saravana Prakash
  • 1,321
  • 13
  • 25
5
votes
3 answers

Get reference to (Mock)ResourceResolverFactory

I have a Sling model class containing a reference to a service of mine: @OSGiService PlanService planService; This service has a reference to ResourceResolverFactory, to get a ResourceResolver with the "admin user": @Reference private…
5
votes
2 answers

cq5 get parent node properties

I have component hierarchy parsys -> parentcomp -> childcomp parentcomp node has some properties. I am trying to access parent parentcomp properties at childcomp level. I am not sure how to do this. Any idea how to get a parent node properties. I…
Sri
  • 1,205
  • 2
  • 21
  • 52
5
votes
2 answers

AEM 6.1: Enable Rich text editor (RTE) plugins on Touch UI

for classic UI we can easily add the plugins inside rteplugins tag, Adobe built a great example on their Geometrix-Outdoor project:
Tien Nguyen
  • 4,298
  • 9
  • 30
  • 44
5
votes
2 answers

AEM 6.1 Sightly basic form submit and redirect to same page

I am trying to do the following on AEM 6.1: Develop a simple form (3 input fields) Process the submitted values, And redirect to the same page with processed values/result I am able to submit the values to a servlet, and process them (business…
Suren Konathala
  • 3,497
  • 5
  • 43
  • 73
5
votes
3 answers

How to work with a bundle in eclipse when it was downloaded from AEM

I downloaded a zip from a running instance of AEM from package manager - http://localhost:4502/crx/packmgr/index.jsp. The zip file, when extracted contains, jcr_root and META-INF. I would like to build some functionality on top of this zip file.…
birdy
  • 9,286
  • 24
  • 107
  • 171
5
votes
1 answer

How to invoke Sling Servlet that uses "resourceType" instead of "paths" in @SlingServlet annotation

How do I invoke a Sling Servlet that uses the "resourceType" property inside @SlingServlet? When I use"paths" I just call it with an ajax call but I am not sure what to do if I change my servlet to use "resourceType" instead of "paths". (I am…
mitchj
  • 623
  • 4
  • 9
  • 16
5
votes
1 answer

How to add a custom Sling binding?

I want to extend Sling bindings with a custom object, so it'll be available in all JSP files without an extra effort. I'm implementing BindingsValuesProvider OSGi service, like this (it's not an actual code, but similar…
Tomek Rękawek
  • 9,204
  • 2
  • 27
  • 43
5
votes
0 answers

How to prevent AEM/Sling from adding trailing slash to the extensionless URLs?

All extensionless URLs on the site, which resolve to the actual nodes, are being redirected (with 301 code) to their versions with added trailing slash. It doubles amount of requests to the frontend web server so we would like to fix this. We do use…
Jura Khrapunov
  • 1,024
  • 6
  • 14
5
votes
1 answer

What is the purpose of the star resource path?

Adobe AEM parsys component renders all children resources and if the WCM mode is set to the appropriate value, it displays Drop component section, which can be used to add new paragraphs. Implementation of the Drop component section is quite strange…
Tomek Rękawek
  • 9,204
  • 2
  • 27
  • 43
5
votes
3 answers

What does it mean that Apache Sling "more REST" than Spring-mvc?

Sometimes vaguely I hear that Apache Sling more REST than Spring-mvc from my colleagues. I don't have possibilities to know about it from them. I have enough experience with Spring-mvc and I am novice in Apache Sling. Can anyone explain the…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
1 2
3
57 58