View | Details | Raw Unified | Return to bug 47318
Collapse All | Expand All

(-)java/org/apache/jasper/compiler/ParserController.java (-1 / +26 lines)
Lines 22-29 Link Here
22
import java.io.InputStreamReader;
22
import java.io.InputStreamReader;
23
import java.net.JarURLConnection;
23
import java.net.JarURLConnection;
24
import java.net.URL;
24
import java.net.URL;
25
import java.util.jar.JarFile;
26
import java.util.Iterator;
27
import java.util.List;
25
import java.util.Stack;
28
import java.util.Stack;
26
import java.util.jar.JarFile;
27
29
28
import org.apache.jasper.JasperException;
30
import org.apache.jasper.JasperException;
29
import org.apache.jasper.JspCompilationContext;
31
import org.apache.jasper.JspCompilationContext;
Lines 122-127 Link Here
122
124
123
125
124
    /**
126
    /**
127
     * For includePrelude and coda
128
     *
129
     * @param files The paths of the resource to be included.
130
     * @param nodes The parent node of the include directive.
131
     */
132
    public Node.Nodes parseIncludeDirectives(List files, Node.Nodes nodes)
133
    throws FileNotFoundException, JasperException, IOException {
134
        isTagFile = ctxt.isTagFile();
135
        directiveOnly = true;
136
        if (files != null) {
137
            Iterator iter = files.iterator();
138
            while (iter.hasNext()) {
139
                Node.Nodes directives = doParse((String) iter.next(), null, null);
140
                for (int i=0;directives!=null&&i<directives.size();i++) {
141
                    nodes.add(directives.getNode(i));
142
                }
143
            }
144
        }
145
        return nodes;
146
    }
147
148
149
    /**
125
     * Processes an include directive with the given path.
150
     * Processes an include directive with the given path.
126
     *
151
     *
127
     * @param inFileName The path to the resource to be included.
152
     * @param inFileName The path to the resource to be included.
(-)java/org/apache/jasper/compiler/Compiler.java (+7 lines)
Lines 164-169 Link Here
164
            // Pass 1 - the directives
164
            // Pass 1 - the directives
165
            Node.Nodes directives =
165
            Node.Nodes directives =
166
                parserCtl.parseDirectives(ctxt.getJspFile());
166
                parserCtl.parseDirectives(ctxt.getJspFile());
167
            directives = 
168
                parserCtl.parseIncludeDirectives(
169
                    pageInfo.getIncludePrelude(), directives);
170
            directives = 
171
                parserCtl.parseIncludeDirectives(
172
                    pageInfo.getIncludeCoda(), directives);
173
167
            Validator.validateDirectives(this, directives);
174
            Validator.validateDirectives(this, directives);
168
175
169
            // Pass 2 - the whole translation unit
176
            // Pass 2 - the whole translation unit

Return to bug 47318