in src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JspScriptingTest.java [111:130]
public void testTagFile() throws Exception {
String tagFile = null;
String tagUsingScript = null;
try {
H.getTestClient().mkdirs(HttpTest.WEBDAV_BASE_URL, "/apps/testing/tags");
tagFile = H.uploadTestScript("/apps/testing/tags", "example.tag", "example.tag");
tagUsingScript = H.uploadTestScript(unstructuredNode.scriptPath, "withtag.jsp", "html.jsp");
final String content = H.getContent(unstructuredNode.nodeUrl + ".html", HttpTest.CONTENT_TYPE_HTML);
assertTrue("JSP script executed as expected (" + content + ")", content.contains("<h1>Hello, Sling User</h1>"));
} finally {
if (tagFile != null) {
H.getTestClient().delete(tagFile);
}
if (tagUsingScript != null) {
H.getTestClient().delete(tagUsingScript);
}
}
}