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

Apache Sling upgrade Jackrabbit

have anyone done something like upgrading embedded jackrabbit server in Apache Sling v. 2.1? I'm not sure if it will be compatibile with sling.jcr.api. Can new version of Jackrabbit be provided as an osgi bundle or is it better to rebuild whole…
adaniluk
  • 321
  • 1
  • 5
  • 18
0
votes
1 answer

System.getProperty from CQ5.6.1

I am using a 3rd party jar file in my CQ5.6.1 project. A program in the jar uses System.getProperty() to read some property file location. I am not able to find a way to set these properties for the program to read. Any idea how I can do this in…
jpr
  • 185
  • 3
  • 6
  • 20
0
votes
2 answers

Difference between cq:include and sling:include

What is the difference between sling and cq includes and when should each one be used? I kinda find both solving the same purpose. There is this link which recommends use of sling include and then there is cq doc which recommend use of cq include.…
SubSul
  • 2,523
  • 1
  • 17
  • 27
0
votes
2 answers

Does file extension is same as url extension in Sling

Url in Sling has following structure: Also I have read following information aboutn dispatcher cache: The Dispatcher always requests the document directly from the AEM instance in the following cases: If the HTTP method is not GET. Other common…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
1 answer

Uploading File in DAM Programmatically using AssetManager? What MimeType should I use?

I have a form that uploads a File to a SlingServlet. The SlingSerlvet receives the file and it tries to save the file in DAM using com.day.cq.dam.api.AssetManager.(i.e. Save file in DAM programmatically) The problem arises with MIME types. The user…
Oliver
  • 6,152
  • 2
  • 42
  • 75
0
votes
0 answers

JCR Node.getReferences() doesn't work

I'm using Apache Sling and its Jackrabbit JCR 2.0. With the latest libs. Now I'm trying to get references to my node as following groovy code shows node.getWeakReferences("track").toList().size() returns…
0
votes
1 answer

Setting a JCR Date property

I'm having some trouble writing properties of a cq:PageContent. releaseDate (type Date) is giving me some trouble. The following method is from a sling-junit test where I'm calling from a @Before method. private void setNewsReleaseDate(Resource res,…
Cris Rockwell
  • 904
  • 2
  • 16
  • 30
0
votes
1 answer

How to get the modified node lists before calling session.save()?

Is it possible to get the modified nodes list before calling session's save method? I want to know what nodes were modified or added, and right now I use a very inefficient way for this: Looping through the 'content' path and calling these methods…
nerd
  • 837
  • 6
  • 21
0
votes
1 answer

Error Handling in CQ5.6.1

I am working on a CQ 5.6.1 project. I am trying to find how to redirect the 404 error to a custom error page specific to my application. From reading various articles on error handling, I find that the /apps/sling/servlet/errorhandler/404.jsp is…
jpr
  • 185
  • 3
  • 6
  • 20
0
votes
1 answer

CQ5 currentPage.listChildren() does not list all the pages

I have a page say xyz which contains many sub pages. Some of the subpages are "CUG enabled". In my jsp I am calling currentPage.listChildren() but this is listing the CUG enabled pages only if I login as an admin. If anonymous user hits the url for…
Rakesh
  • 4,264
  • 4
  • 32
  • 58
0
votes
1 answer

How to call CQ author URL from a standalone code

I am trying to hit URL in cq Author instance from my standalone code. The URL looks like — http://://libs/dam/gui/content/reports/export.json Below is the code: URL url = new URL(newPath); HttpURLConnection connection =…
sudha
  • 11
  • 1
0
votes
2 answers

Additive logback configuration for OSGi log configuration

I installed this bundle to CQ5.6.1 org.apache.sling org.apache.sling.commons.log 4.0.0 It works good, I have problem only with the additivity…
nerd
  • 837
  • 6
  • 21
0
votes
2 answers

how to call a sling servlet through osgi bundle inside CQ5

I just created a Sling servlet through maven.packaging as - "bundle", then I installed it inside system console of CQ5. My bundle shows me Active state and all the required packages ..exported successfully. but I when I call this bundle to use the…
vedmtripathi
  • 11
  • 2
  • 6
0
votes
2 answers

Ideas on possible reasons for two AEM instances to resolve a URL with different servlet?

I have two AEM instances, one local, and one on our dev machine, that have the same code, setup, etc.. URL's are correctly resolving as custom servlets that are defined by the path. However, on another machine that sits on the client's environment,…
Megan M.
  • 1
  • 1
0
votes
2 answers

CQ5 QueryBuilder Reference in Sling Servlet

I am declaring a sling servlet like so @Component(metatype = false) @Service(Servlet.class) @Properties({ @Property(name = "sling.servlet.paths", value = "/bin/foo/bar"), @Property(name = "sling.servlet.methods", value = "POST")…
Juan Ayala
  • 3,388
  • 2
  • 19
  • 24