Hi Torgeir, Torgeir Veimo schrieb: > Is it possible to request a script directly, eg. use a request such as > /apps/notes/html.esp, and make that script execute instead of being > returned as plaintext?
This is not currently possible (though the implementation would be rather simple). The problem is that we also support WebDAV on "/" through the Sling WebDAV bundle. So, for WebDAV we might want to expect the script to be returned as plaintext to be able to edit and modify it. I could imagine two options: (1) we add a configuration setting, which controls whether scripts are executed or not or (2) add a servlet to handle a special extension, which would execute the script. I would prefer this second option. The servlet would have a rather simple service() method implementation: public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException { Servlet servlet = ((SlingHttpServletRequest) req). getResource.adaptTo(Servlet.class); if (servlet != null) { servlet.service(req, res); } else { // send error } } Regards Felix