--- java/org/apache/jasper/compiler/ParserController.java (revision ) +++ java/org/apache/jasper/compiler/ParserController.java (revision ) @@ -557,7 +557,7 @@ return fileName; } - /* + /** * Checks to see if the given page contains, as its first element, a * element whose prefix is bound to the JSP namespace, as in: * @@ -608,16 +608,17 @@ } if (index < root.length() && root.charAt(index) == '=') { index++; - while (index < root.length() - && Character.isWhitespace(root.charAt(index))) { + while (index < root.length() && Character.isWhitespace(root.charAt(index))) { index++; } - if (index < root.length() && root.charAt(index++) == '"' - && root.regionMatches(index, JSP_URI, 0, - JSP_URI.length())) { + + if (index < root.length() && (root.charAt(index) == '"' || root.charAt(index) == '\'')) { + index++; + if (root.regionMatches(index, JSP_URI, 0, JSP_URI.length())) { - return true; - } - } + return true; + } + } + } return false; }