Adding sonarqube badges as per SLING-9682
1 file changed
tree: 36f7464d7a528fadd1476bb51d027446cdff933c
  1. .gitignore
  4. Jenkinsfile
  7. pom.xml
  8. src/

Apache Sling

Build Status Coverage Sonarcloud Status JavaDoc Maven Central Contrib scripting License

Apache Sling Scripting Java Support

This module is part of the Apache Sling project.

This module implements a script engine for java servlets, that are compiled on the fly by Sling.

To test it:

  1. Install this bundle in Sling, for example with

mvn -P autoInstallBundle clean install -Dsling.url=http://localhost:8080/system/console

If Sling is running with the launchpad/testing setup.

  1. Create /apps/foo/ in your repository (via WebDAV for example), with this code:


import; import javax.servlet.ServletException; import; import; import;

public class foo extends SlingSafeMethodsServlet {

protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) 
throws ServletException, IOException {
    response.getWriter().write("Response from " + getClass().getName() + " at " + new java.util.Date());


  1. Request http://localhost:8080/content/foo/*.html which should display something like

Response from at Tue Nov 18 14:49:14 CET 2008

  1. The servlet code should be automatically recompiled after any changes.