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

Understanding synchronized keyword on AdapterManagerImpl a class of sling framework

I'm researching how sling framework work behind the sence. But my knowledge on multi thread programming is very limited to understand what they are doing, here's my issue: This is the class i'm working on AdapterManagerImpl.java, on function…
Tien Nguyen
  • 4,298
  • 9
  • 30
  • 44
0
votes
3 answers

How to schedule a job on server in Java web application

I am new to J2EE and i am working on couple of tasks. one of them is : I have a web application that works like a reporting toolbox hosted by Apache tomcat 7, I need a heavy weight job to be scheduled to run every hour or other intervals, I googled…
DjBuddy
  • 171
  • 1
  • 4
  • 14
0
votes
1 answer

CORS issue with rest service hosted in Adobe CQ

We have CORS issue with rest service hosted in Adobe CQ (Please note that this is a proof of concept application only). To fix this, we have added a simple filter to set required response headers. The code for the filter is some thing like public…
kallada
  • 1,829
  • 4
  • 33
  • 64
0
votes
3 answers

Sling: Find out if resource is an image

I have a completely set-up CQ5/AEM application and am supposed to generate a sitemap.xml. So far, so good. I have a list of all the pages, but some of those pages are actually images. My question: How can I find out if a page is actually an image?…
Jene
  • 53
  • 5
0
votes
2 answers

Sling - AEM sling:members from a new collection

I've recently entered the world of AEM and sling (api). What I'm trying to do is write Java code to get the sling:members and its properties sling:resources for a new collection I created in the touch. I'm able to reference the collection…
ogottwald
  • 113
  • 1
  • 3
  • 15
0
votes
0 answers

Resource Resolver being returned as null via Sling Models Annotation

Resource Resolver is being returned as null while injecting through sling models , let me know if anything i am missing : I tried with : @Model(adaptables = Resource.class) public class Navigation { @Inject @Source("sling-object") private…
user3837000
  • 121
  • 3
  • 12
0
votes
1 answer

Adobe AEM6 /CQ : populating field value in the page: with sightly and design dialog

I am populating text field field value in the current page with a component in sightly with design dialog: I have a helper class and a model class. In a helper class I call : getResource().adaptTo(ModelClass.class); in the activate method for a…
Ajax
  • 148
  • 7
  • 24
0
votes
2 answers

How to create a resource mapping node in AEM using sling REST api and curl

I'm trying to create a node using the sling api in AEM 6.0. Now I know I can easily create a node using a curl call like this curl -u admin:admin -F"jcr:primaryType= sling:Mapping" http://localhost:4502/content/mynode But what if I need to get…
0
votes
1 answer

How to get SlingRequest from saxon TransformerFactory

I want to get a current SlingRequest.getRequestURI() and pass it to new LinkTransformer(links, repository, <>). So I tried to add an annotation @Reference SlingRequest slingRequest and it throws me exception. Here is my code: package…
user454232
  • 841
  • 2
  • 10
  • 23
0
votes
1 answer

CQ5 SlingServlet and resourceTypes not working for specific resource paths

If I define a Sling Servlet as follows: @SlingServlet( label="TestResourceTypeServlet", name = "com.company.project.servlets.TestResourceType", extensions = {"bob"}, resourceTypes= {"cq:Page"}, methods= {"GET"}, …
scribe1010
  • 213
  • 3
  • 16
0
votes
1 answer

How to programatically delete revisions of a page in CQ5?

In the current setup; we are trying to automate the process of creating the blueprint page, rolling it out to its live copies; and activating the live copy pages.Also; deactivation and deletion of pages is also done programmatically . All this is…
cquser
  • 63
  • 9
0
votes
2 answers

Authorisation issue while accessing a page from repository in CQ5.

I'm trying to hit a page which contains a xml structure. for that i'm using this code @Reference private SlingRepository repository; adminSession = repository.loginAdministrative(…
user2142786
  • 1,484
  • 9
  • 41
  • 74
0
votes
0 answers

How to access a SlingServlet by its URL?

I have created an OSGi Bundle and uploaded to a CQ5 server. This bundle contains a SlingServlet like this: @SlingServlet(paths = { "/rest/matches" }, methods = { "POST", "GET" }) public class MatchDayRestServlet extends SlingAllMethodsServlet { …
Alexandru Pupsa
  • 1,798
  • 4
  • 21
  • 40
0
votes
1 answer

Can I reference ResourceResolver?

I have this Filter: @SlingFilter(description="", vendor="", order=10) class MyFilter extends DoNothingFilter { @Reference private ResourceResolver; } When I am building with this @Reference line my bundle is not containing attached filter…
Dawid Pura
  • 991
  • 9
  • 32
0
votes
1 answer

AEM 6: SlingBindings object is null

I have created sling:OsgiConfig nodes inside config folders like config.author, config.publish and so on. I am trying to fetch properties from these nodes by doing something like this: public static List fetchTokenLinksFromOsgiConfig(final…
user972418
  • 817
  • 3
  • 25
  • 58