privatevoid handleDuplicate(String qName, String value) { if (pageDirective) { if (IMPORT.equalsIgnoreCase(qName)) { // Always merge imports int i = super.getIndex(IMPORT);
String v = super.getValue(i); super.setValue(i, v + "," + value); return;
} elseif (PAGE_ENCODING.equalsIgnoreCase(qName)) { // Page encoding can only occur once per file so a second // attribute - even one with a duplicate value - is an error
} else { // Other attributes can be repeated if and only if the values // are identical
String v = super.getValue(qName); if (v.equals(value)) { return;
}
}
}
// Ordinary tag attributes can't be repeated, even with identical values thrownew IllegalArgumentException(
Localizer.getMessage("jsp.error.duplicateqname", qName));
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.