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

Mustache + Sling + CQ5

I'm researching a means of using Mustache templating for the view engine in CQ5, which uses Sling. I'm looking for some advise if anyone has already had experience going into this. I need to use a template format that can be shared between front and…
David
  • 357
  • 1
  • 4
  • 13
0
votes
0 answers

Java recursive function duplicating output

I'm really new to Java and recursive functions in general. I'm a bit lost on a couple things. Why for some reason am I getting duplicate output. It only seems to be when I traverse up in the content. I have an idea why this is happening because it…
Delmon Young
  • 2,013
  • 5
  • 39
  • 51
0
votes
1 answer

Method duplicates output

Pretty new to sling and Java so I apologize in advance. But does anybody have any idea why when I'm at the root it's outputting my path twice? It's odd that it only happens at the absolute root. public static String generateTest(Page page, Page…
Delmon Young
  • 2,013
  • 5
  • 39
  • 51
0
votes
2 answers

CQ5.5 order standard HTTP filters deployed as OSGI components

In CQ5.5 How I can order 2 standard HTTP Filters deployed as OSGI components? The issue is that the 2 filters have to run in order where FilterA should run first and then FilterB in sequence. How I can order my 2 filters in sequence? Do you know if…
Navi
  • 109
  • 1
  • 2
  • 9
0
votes
2 answers

Apache Sling loop repeating

Does anyone know why the code below is outputting 2 of each navigation element. //get the full path to the current page String home = Text.getAbsoluteParent(currentPage.getPath(), 2); int absParent = currentStyle.get("absParent", 1); //checks…
Delmon Young
  • 2,013
  • 5
  • 39
  • 51
0
votes
1 answer

Configurable Java Servlet from OSGI

I'm trying to create a Java class that is configurable via the OSGi console. I've heard you can do this via SCR annotations but not entirely sure how. I've got the bulk of it but unsure what to get and post and how to reference it in the JSP. Here…
Delmon Young
  • 2,013
  • 5
  • 39
  • 51
0
votes
1 answer

access pageContext variables in JSTL within Apache Sling

I am creating a JSP in Apache Sling, where I use a scriplet to retrieve a list of objects, which I then want to iterate over using JSTL. However, with the code below, I do not see any of my results within JSTL. I can use JSTL ( The important…
Sean Charles
  • 267
  • 3
  • 18
0
votes
1 answer

Maven and Apache Sling - No plugin found

Complete newb to maven, sling and java in general so I apologize in advance. I've got maven up and running and am trying to get it running with apache sling. But when I try to start up sling using "mvn launchpad:run" I'm running into the following…
Delmon Young
  • 2,013
  • 5
  • 39
  • 51
0
votes
1 answer

NoClassDefFoundError errors in Sling logs when uploading docx, xslx, pptx

I am getting the below multiple errors (see below - one per file) when uploading any office 2007 docs (e.g. pptx, docx, xslx) into Sling. I am using Sling 6 stable standalone. Is anyone else experiencing this? Are there any known issues with the…
NabilS
  • 1,421
  • 1
  • 19
  • 31
0
votes
1 answer

How to set jsp pages unaccessible from addressing via browsers in Apache Sling?

I am developing a sling WCMS. When I call address [e.g. 'http://localhost:8080/apps/bcms/pages/test.jsp'] of a page in the browser, a save dialog box will appear and ask to save jsp file. How to prevent jsp pages accessible via direct addressing?
Babak Behzadi
  • 1,236
  • 2
  • 16
  • 33
0
votes
2 answers

How to access apache sling remotely?

I'm developing a Sling WCMS. I need to setup Sling repo on a server computer and access remotely. How can I access sling repo remotely? Is there special configuration? Thanks.
Babak Behzadi
  • 1,236
  • 2
  • 16
  • 33
0
votes
1 answer

org.apache.sling.scripting.jsp.jasper.JasperException: Unable to load tag handler class

I'm developing an Apache Sling WCMS and using java tag libs to rendering some data. I'm using IntelliJ IDEA 10.0 I defined a jsp tag lib with following descriptor and handler class: TLD file contains:
Babak Behzadi
  • 1,236
  • 2
  • 16
  • 33
0
votes
1 answer

Upload / Download BLOBs Jackrabbit

I'm looking for a way to provide upload/download mechanism for blob files. These files should be stored in a jackrabbit datasource repository. I already discovered apache Sling framework for this task but it seems that this is not applicable for…
nico1510
  • 606
  • 9
  • 29
0
votes
1 answer

Running all test classes with JUnitServlet in CQ5 integration testing

i have a question about JUnitServlet in CQ5 integration testing. I dont understand 2 things and i need help from somebody that had similar problem. So far I have package with only one test class with several testing methods. Everything works fine…
Dragan
  • 500
  • 3
  • 11
0
votes
1 answer

Access jackrabbit repository through Apache Sling

I followed Apache Sling tutorials using its Launchpad. As I understood, it uses a built in jackrabbit repository within the Launchpad. Is there a way to access a standalone jackrabbit repository using Sling API without using its launchpad? Thanks. …
Bee
  • 12,251
  • 11
  • 46
  • 73