commit | c2631f01c4d5d144ec973581fe2eacb49886e93a | [log] [tgz] |
---|---|---|
author | Oliver Lietz <olli@apache.org> | Mon Oct 02 16:19:15 2017 +0000 |
committer | Oliver Lietz <olli@apache.org> | Mon Oct 02 16:19:15 2017 +0000 |
tree | c23b1cdeea0d96213145c6e41a613caccd691328 | |
parent | 626db7f1732da589281e8e550468d3e5776687fd [diff] |
SLING-7167 Adjust READMEs switch from plain text to Markdown git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810513 13f79535-47bb-0310-9956-ffa450edef68
This module implements a script engine for java servlets, that are compiled on the fly by Sling.
To test it:
mvn -P autoInstallBundle clean install -Dsling.url=http://localhost:8080/system/console
If Sling is running with the launchpad/testing setup.
package apps.foo;
import java.io.IOException; import javax.servlet.ServletException; import org.apache.sling.api.SlingHttpServletRequest; import org.apache.sling.api.SlingHttpServletResponse; import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
public class foo extends SlingSafeMethodsServlet {
protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException { response.setContentType("text/plain"); response.getWriter().write("Response from " + getClass().getName() + " at " + new java.util.Date()); }
}
Response from apps.foo.foo at Tue Nov 18 14:49:14 CET 2008