bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/ParserController.java
private String getPageEncodingFromDirective(Attributes attrs,
                                                String attrName) {
	String value = attrs.getValue(attrName);
        if (attrName.equals("pageEncoding")) {
            return value;
        }

        // attrName = contentType
        String contentType = value;
        String encoding = null;
        if (contentType != null) {
	    int loc = contentType.indexOf(CHARSET);
	    if (loc != -1) {
		encoding = contentType.substring(loc + CHARSET.length());
	    }
	}

	return encoding;
    }
private String getPageEncodingFromDirective(Attributes attrs,
                                                String attrName) {
	String value = attrs.getValue(attrName);
        if (attrName.equals("pageEncoding")) {
            return value;
        }

        // attrName = contentType
        String contentType = value;
        String encoding = null;
        if (contentType != null) {
	    int loc = contentType.indexOf(CHARSET);
	    if (loc != -1) {
		encoding = contentType.substring(loc + CHARSET.length());
	    }
	}

	return encoding;
    }
private String getPageEncodingFromDirective ( Attributes attrs , String attrName ) { String value = attrs . getValue ( attrName ) ; if ( attrName . equals ( "pageEncoding" ) ) { return value ; } // attrName = contentType String contentType = value ; String encoding = null ; if ( contentType != null ) { int loc = contentType . indexOf ( CHARSET ) ; if ( loc != - 1 ) { encoding = contentType . substring ( loc + CHARSET . length ( ) ) ; } } return encoding ; }
/*
Scans the given attributes for the attribute with the given name,
which is either 'pageEncoding' or 'contentType', and returns the
specified page encoding.

In the case of 'contentType', the page encoding is taken from the
content type's 'charset' component.

@param attrs The page directive attributes
@param attrName The name of the attribute to search for (either
'pageEncoding' or 'contentType')

@return The page encoding, or null
/ * Scans the given attributes for the attribute with the given name which is either pageEncoding or contentType and returns the specified page encoding .