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
2 answers

When does org.apache.sling.api.scripting.SlingScriptHelper.getService(Class) returns null? VerifyError: Expecting a stackmap frame

According this documentation link: apidocs SlingScriptHelper.getService returns null if service is not availibale. Can you explain conditions when service is unavailble and how to force it to become availible ? edit: components view: relevant…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
1 answer

CQ 5.6.1 properties.get() returning null

I have a text component, and within it I have the text.jsp. To the text component, I added the property jcr:title and assigned value "Text" to it. In the text.jsp, I added the following snippet to read the jcr:title property. String strText =…
jpr
  • 185
  • 3
  • 6
  • 20
0
votes
1 answer

Creating a custom task scheduler in Adobe CQ

We have a specific requirement to create a custom scheduler in CQ to perform some admnistrative tasks based on some parameters specified by the administrator. I have seen the Scheduler service offered by Sling. But wanted to know whether there is…
kallada
  • 1,829
  • 4
  • 33
  • 64
0
votes
1 answer

Cannot access request parameters after forwarding from a Sling Servlet

After performing some validation in a Sling Servlet, I want to redirect to a 'Thank you' page, but it is not working — I can't access the request object. We are doing it this way: RequestDispatcher dispatcher =…
OmP
  • 189
  • 1
  • 3
  • 21
0
votes
1 answer

How to render a simple JSP page in CQ?

We have deployed an AngularJS app to CQ5. At the moment, the views for this app are just static HTML files and stored underneath, say, /apps/myapp/views/: /apps/myapp/views/list.html /apps/myapp/views/view.html etc. Angular then sends AJAX…
Behrang
  • 46,888
  • 25
  • 118
  • 160
0
votes
2 answers

SlingModel still returning null when adapting item

I am trying to get Sling Models working. I have a simple annotated POJO that maps to a JCR Node by convention as follows: @Model(adaptables=Resource.class) public class FlushRule { @Inject public String optingRegex; } I have set a String value…
Bayani Portier
  • 660
  • 8
  • 18
0
votes
2 answers

OSGI dependency issue with Sling Models project

I'm having a slight problem with incorporating the appropriate maven dependencies into my project for sling models. When I deploy my bundle, I get the following import that can't be resolved: org.apache.sling.models.annotations,version=[1.1,2) --…
Bayani Portier
  • 660
  • 8
  • 18
0
votes
1 answer

Accessing the style properties from an OSGi service

I have an OSGi service that needs to access values stored by a component in it's design dialog. Since I don't have access to the currentStyle value. I've attempted to access that Style object by instantiating it myself, with little luck. My current…
JE Bailey
  • 727
  • 7
  • 25
0
votes
1 answer

cq get currentpage's jcr:content/image node property->fileReference

i m working on a piece of cq component, what i need is to retrieve an image filereference path and render the image on the page. e.g this is my page structure as shows on picture. say i m current on index page, i know how to retrieve index page's…
sefirosu
  • 2,558
  • 7
  • 44
  • 69
0
votes
2 answers

Overriding Sling DefaultGetServlet.java

I'm working on a servlet to perform some logic specific to a resourceType in sling and set information to the request to be accessible via the jsp then handing off the request to the jsp similarly to the first solution provided in this…
Thomas
  • 303
  • 3
  • 14
0
votes
1 answer

CQ Jcr node how to resolve Sling:OrderedFolder jcr:primarytype and get children nodes

the path for above structure's parent: pdf folder, is -> /content/dam/example/corporate/pdf and pdf folder's value of jcr:primarytype is Sling:OrderedFolder ,so does the other two folder '2013' '2014'... if the parent 'pdf' is a page type, i…
sefirosu
  • 2,558
  • 7
  • 44
  • 69
0
votes
1 answer

OSGi LogService error when deploying apache sling in an app container

I am new to sling (and jackrabbit). I can start the standalone sling instance without any problem. When I try to deploy the webapp in an app container, I get the following exception in the server.log: ERROR: Error starting…
0
votes
4 answers

How to provide restricted Access to DAM Contents?

Please understand that when I say Restricted access, I am not restricting the Authors, but the End Users of my Website. So please don't tell me about the CUG(Closed User groups). I am making a CQ5 website in which when a user(End User) logs in,…
Oliver
  • 6,152
  • 2
  • 42
  • 75
0
votes
2 answers

When a CQ5 form is added to a page, how does CQ5 also add an accompanying form_end_xyz to he page?

In CQ5, when a form (sling:resourceType=foundation/components/form/start) is added to a page, CQ5 automatically adds a form_end_xyz (sling:resourceType=foundation/components/form/end) component after that component: How is this accomplished?
Behrang
  • 46,888
  • 25
  • 118
  • 160
0
votes
2 answers

How to retrieve a node from a Page in CQ5?

I have 2 Questions: 1) By using the Page name i did Xpath Query like this: //element(*, cq:Page) [ fn:name() = 'hello-world ' ] and i am able to find the page too (tried in crxde Lite and its finding the correct page). how to Convert the…
Kums
  • 25
  • 3
  • 7