src/java/org/apache/turbine/services/template/mapper/LayoutTemplateMapper.java [107:148]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        boolean firstRun = !templateName.equals(defaultName);

        for(;;)
        {
            String templatePackage = StringUtils.join(components.iterator(), String.valueOf(separator));

            log.debug("templatePackage is now: {}", templatePackage);

            StringBuilder testName = new StringBuilder();

            if (!components.isEmpty())
            {
                testName.append(templatePackage);
                testName.append(separator);
            }

            testName.append((firstRun)
                ? templateName
                : defaultName);

            // But the Templating service must look for the name with prefix
            StringBuilder templatePath = new StringBuilder();
            if (StringUtils.isNotEmpty(prefix))
            {
                templatePath.append(prefix);
                templatePath.append(separator);
            }
            templatePath.append(testName);

            log.debug("Looking for {}", templatePath);

            if (tes.templateExists(templatePath.toString()))
            {
                log.debug("Found it, returning {}", testName);
                return testName.toString();
            }

            if (firstRun)
            {
                firstRun = false;
            }
            else
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/java/org/apache/turbine/services/template/mapper/ScreenDefaultTemplateMapper.java [102:143]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        boolean firstRun = !templateName.equals(defaultName);

        for(;;)
        {
            String templatePackage = StringUtils.join(components.iterator(), String.valueOf(separator));

            log.debug("templatePackage is now: {}", templatePackage);

            StringBuilder testName = new StringBuilder();

            if (!components.isEmpty())
            {
                testName.append(templatePackage);
                testName.append(separator);
            }

            testName.append((firstRun)
                ? templateName
                : defaultName);

            // But the Templating service must look for the name with prefix
            StringBuilder templatePath = new StringBuilder();
            if (StringUtils.isNotEmpty(prefix))
            {
                templatePath.append(prefix);
                templatePath.append(separator);
            }
            templatePath.append(testName);

            log.debug("Looking for {}", templatePath);

            if (tes.templateExists(templatePath.toString()))
            {
                log.debug("Found it, returning {}", testName);
                return testName.toString();
            }

            if (firstRun)
            {
                firstRun = false;
            }
            else
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



