bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/Parser.java
private void parseXMLDirective(Node parent) throws JasperException {
       reader.skipSpaces();

        String eTag = null;
       if (reader.matches("page")) {
            eTag = "jsp:directive.page";
           if (isTagFile) {
               err.jspError(reader.mark(), "jsp.error.directive.istagfile",
                                           "&lt;" + eTag);
           }
           parsePageDirective(parent);
       } else if (reader.matches("include")) {
            eTag = "jsp:directive.include";
           parseIncludeDirective(parent);
       } else if (reader.matches("tag")) {
            eTag = "jsp:directive.tag";
           if (!isTagFile) {
               err.jspError(reader.mark(), "jsp.error.directive.isnottagfile",
                                           "&lt;" + eTag);
           }
           parseTagDirective(parent);
       } else if (reader.matches("attribute")) {
            eTag = "jsp:directive.attribute";
           if (!isTagFile) {
               err.jspError(reader.mark(), "jsp.error.directive.isnottagfile",
                                           "&lt;" + eTag);
           }
           parseAttributeDirective(parent);
       } else if (reader.matches("variable")) {
            eTag = "jsp:directive.variable";
           if (!isTagFile) {
               err.jspError(reader.mark(), "jsp.error.directive.isnottagfile",
                                           "&lt;" + eTag);
           }
           parseVariableDirective(parent);
       } else {
	   err.jspError(reader.mark(), "jsp.error.invalid.directive",
               reader.parseToken(false));
       }

       reader.skipSpaces();
        if( reader.matches( ">" ) ) {
            reader.skipSpaces();
            if( !reader.matchesETag( eTag ) ) {
                err.jspError(start, "jsp.error.unterminated", "&lt;" + eTag );
            }
        }
        else if( !reader.matches( "/>" ) ) {
            err.jspError(start, "jsp.error.unterminated", "&lt;" + eTag );
        }
    }
private void parseXMLDirective(Node parent) throws JasperException {
       reader.skipSpaces();

        String eTag = null;
       if (reader.matches("page")) {
            eTag = "jsp:directive.page";
           if (isTagFile) {
               err.jspError(reader.mark(), "jsp.error.directive.istagfile",
                                           "&lt;" + eTag);
           }
           parsePageDirective(parent);
       } else if (reader.matches("include")) {
            eTag = "jsp:directive.include";
           parseIncludeDirective(parent);
       } else if (reader.matches("tag")) {
            eTag = "jsp:directive.tag";
           if (!isTagFile) {
               err.jspError(reader.mark(), "jsp.error.directive.isnottagfile",
                                           "&lt;" + eTag);
           }
           parseTagDirective(parent);
       } else if (reader.matches("attribute")) {
            eTag = "jsp:directive.attribute";
           if (!isTagFile) {
               err.jspError(reader.mark(), "jsp.error.directive.isnottagfile",
                                           "&lt;" + eTag);
           }
           parseAttributeDirective(parent);
       } else if (reader.matches("variable")) {
            eTag = "jsp:directive.variable";
           if (!isTagFile) {
               err.jspError(reader.mark(), "jsp.error.directive.isnottagfile",
                                           "&lt;" + eTag);
           }
           parseVariableDirective(parent);
       } else {
	   err.jspError(reader.mark(), "jsp.error.invalid.directive",
               reader.parseToken(false));
       }

       reader.skipSpaces();
        if( reader.matches( ">" ) ) {
            reader.skipSpaces();
            if( !reader.matchesETag( eTag ) ) {
                err.jspError(start, "jsp.error.unterminated", "&lt;" + eTag );
            }
        }
        else if( !reader.matches( "/>" ) ) {
            err.jspError(start, "jsp.error.unterminated", "&lt;" + eTag );
        }
    }
private void parseXMLDirective ( Node parent ) throws JasperException { reader . skipSpaces ( ) ; String eTag = null ; if ( reader . matches ( "page" ) ) { eTag = "jsp:directive.page" ; if ( isTagFile ) { err . jspError ( reader . mark ( ) , "jsp.error.directive.istagfile" , "&lt;" + eTag ) ; } parsePageDirective ( parent ) ; } else if ( reader . matches ( "include" ) ) { eTag = "jsp:directive.include" ; parseIncludeDirective ( parent ) ; } else if ( reader . matches ( "tag" ) ) { eTag = "jsp:directive.tag" ; if ( ! isTagFile ) { err . jspError ( reader . mark ( ) , "jsp.error.directive.isnottagfile" , "&lt;" + eTag ) ; } parseTagDirective ( parent ) ; } else if ( reader . matches ( "attribute" ) ) { eTag = "jsp:directive.attribute" ; if ( ! isTagFile ) { err . jspError ( reader . mark ( ) , "jsp.error.directive.isnottagfile" , "&lt;" + eTag ) ; } parseAttributeDirective ( parent ) ; } else if ( reader . matches ( "variable" ) ) { eTag = "jsp:directive.variable" ; if ( ! isTagFile ) { err . jspError ( reader . mark ( ) , "jsp.error.directive.isnottagfile" , "&lt;" + eTag ) ; } parseVariableDirective ( parent ) ; } else { err . jspError ( reader . mark ( ) , "jsp.error.invalid.directive" , reader . parseToken ( false ) ) ; } reader . skipSpaces ( ) ; if ( reader . matches ( ">" ) ) { reader . skipSpaces ( ) ; if ( ! reader . matchesETag ( eTag ) ) { err . jspError ( start , "jsp.error.unterminated" , "&lt;" + eTag ) ; } } else if ( ! reader . matches ( "/>" ) ) { err . jspError ( start , "jsp.error.unterminated" , "&lt;" + eTag ) ; } }
/*
Parses a directive with the following syntax:

XMLJSPDirectiveBody ::= S? (   ( 'page' PageDirectiveAttrList
S? ( '/>' | ( '>' S? ETag ) )
| ( 'include' IncludeDirectiveAttrList
S? ( '/>' | ( '>' S? ETag ) )
| <TRANSLATION_ERROR>

XMLTagDefDirectiveBody ::= (   ( 'tag' TagDirectiveAttrList
S? ( '/>' | ( '>' S? ETag ) )
| ( 'include' IncludeDirectiveAttrList
S? ( '/>' | ( '>' S? ETag ) )
| ( 'attribute' AttributeDirectiveAttrList
S? ( '/>' | ( '>' S? ETag ) )
| ( 'variable' VariableDirectiveAttrList
S? ( '/>' | ( '>' S? ETag ) )
)
| <TRANSLATION_ERROR>
/ * Parses a directive with the following syntax :