Class ParserController
java.lang.Object
org.apache.jasper.compiler.ParserController
- All Implemented Interfaces:
TagConstants
Controller for the parsing of a JSP page.
The same ParserController instance is used for a JSP page and any JSP segments included by it (via an include directive), where each segment may be provided in standard or XML syntax. This class selects and invokes the appropriate parser for the JSP page and its included segments.
- Author:
- Pierre Delisle, Jan Luehe
-
Field Summary
Fields inherited from interface org.apache.jasper.compiler.TagConstants
ATTRIBUTE_ACTION, ATTRIBUTE_DIRECTIVE_ACTION, BODY_ACTION, DECLARATION_ACTION, DIRECTIVE_ACTION, DOBODY_ACTION, ELEMENT_ACTION, EXPRESSION_ACTION, FORWARD_ACTION, GET_PROPERTY_ACTION, INCLUDE_ACTION, INCLUDE_DIRECTIVE_ACTION, INVOKE_ACTION, JSP_ATTRIBUTE_ACTION, JSP_ATTRIBUTE_DIRECTIVE_ACTION, JSP_BODY_ACTION, JSP_DECLARATION_ACTION, JSP_DOBODY_ACTION, JSP_ELEMENT_ACTION, JSP_EXPRESSION_ACTION, JSP_FORWARD_ACTION, JSP_GET_PROPERTY_ACTION, JSP_INCLUDE_ACTION, JSP_INCLUDE_DIRECTIVE_ACTION, JSP_INVOKE_ACTION, JSP_OUTPUT_ACTION, JSP_PAGE_DIRECTIVE_ACTION, JSP_PARAM_ACTION, JSP_ROOT_ACTION, JSP_SCRIPTLET_ACTION, JSP_SET_PROPERTY_ACTION, JSP_TAG_DIRECTIVE_ACTION, JSP_TAGLIB_DIRECTIVE_ACTION, JSP_TEXT_ACTION, JSP_TEXT_ACTION_END, JSP_URI, JSP_USE_BEAN_ACTION, JSP_VARIABLE_DIRECTIVE_ACTION, OUTPUT_ACTION, PAGE_DIRECTIVE_ACTION, PARAM_ACTION, ROOT_ACTION, SCRIPTLET_ACTION, SET_PROPERTY_ACTION, TAG_DIRECTIVE_ACTION, TAGLIB_DIRECTIVE_ACTION, TEXT_ACTION, URN_JSPTAGDIR, URN_JSPTLD, USE_BEAN_ACTION, VARIABLE_DIRECTIVE_ACTION
-
Method Summary
Modifier and TypeMethodDescriptionParses a JSP page or tag file.Processes an include directive with the given path.parseDirectives
(String inFileName) Parses the directives of a JSP page or tag file.parseTagFileDirectives
(String inFileName, Jar jar) Extracts tag file directive information from the given tag file.
-
Method Details
-
getJspCompilationContext
-
getCompiler
-
parse
Parses a JSP page or tag file. This is invoked by the compiler.- Parameters:
inFileName
- The path to the JSP page or tag file to be parsed.- Returns:
- The parsed nodes
- Throws:
JasperException
- If an error occurs during parsingIOException
- If an I/O error occurs such as the file not being found
-
parseDirectives
Parses the directives of a JSP page or tag file. This is invoked by the compiler.- Parameters:
inFileName
- The path to the JSP page or tag file to be parsed.- Returns:
- The parsed directive nodes
- Throws:
JasperException
- If an error occurs during parsingIOException
- If an I/O error occurs such as the file not being found
-
parse
public Node.Nodes parse(String inFileName, Node parent, Jar jar) throws JasperException, IOException Processes an include directive with the given path.- Parameters:
inFileName
- The path to the resource to be included.parent
- The parent node of the include directive.jar
- The JAR file from which to read the included resource, or null of the included resource is to be read from the filesystem- Returns:
- The parsed nodes
- Throws:
JasperException
- If an error occurs during parsingIOException
- If an I/O error occurs such as the file not being found
-
parseTagFileDirectives
public Node.Nodes parseTagFileDirectives(String inFileName, Jar jar) throws JasperException, IOException Extracts tag file directive information from the given tag file. This is invoked by the compiler- Parameters:
inFileName
- The name of the tag file to be parsed.jar
- The location of the tag file.- Returns:
- The parsed tag file nodes
- Throws:
JasperException
- If an error occurs during parsingIOException
- If an I/O error occurs such as the file not being found
-