<%-- /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. --%><%@page session="false"%><% %><%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling"%><% %><% // used by IncludeTest %><%! private String getProperty(javax.jcr.Node node, String propertyName) { try { if (node.hasProperty(propertyName)) { return node.getProperty(propertyName).getString(); } } catch (Throwable t) { // don't care } return null; } %><% String text = getProperty(currentNode, "text"); String pathToInclude = getProperty(currentNode, "pathToInclude"); String forceResourceType = getProperty(currentNode, "forceResourceType"); String testInfiniteLoop = getProperty(currentNode, "testInfiniteLoop"); String testMaxCalls = getProperty(currentNode, "testMaxCalls"); String testCallScript = getProperty(currentNode, "testCallScript"); String testVarInclude = getProperty(currentNode, "testVarInclude"); %>

JSP template

<%= text %>

Test 1

<% if(pathToInclude != null) { %>

pathToInclude = <%= pathToInclude %>

Including <%= pathToInclude %>

<% } %>

Test 2

<% if(testInfiniteLoop != null) { %>

testInfiniteLoop = <%= testInfiniteLoop %>

<% // try to include the item itself, to cause an infinite loop %> <% } %>

Test 3

<% if(pathToInclude != null && forceResourceType != null) { %>

pathToInclude = <%= pathToInclude %>

Including <%= pathToInclude %>

<% } %>

Test 4

<% if(pathToInclude != null && testMaxCalls != null) { %>

pathToInclude = <%= pathToInclude %>

Including <%= pathToInclude %>

<% for (int i=0; i < 1200; i++) { %> <%= i %>


<% } } %>

Test 5

<% if (testCallScript != null) { %>

Calling <%= testCallScript %>

<% } %>

Test 6

<% if (testCallScript != null) { %>

Calling <%= testCallScript %>

<% } %>

Test 7

<% if (testVarInclude != null) { %>

Calling <%= testCallScript %>

Loaded test content:
${test}

<% } %>