Switching from getColumnName to getColumnLabel as per #43831. JDBC spec indicates that the name should be returned rather than the label, and it seems far more likely that a JSTL user will want the label despite the name of the variable 'columnNames'.
diff --git a/src/javax/servlet/jsp/jstl/sql/ResultImpl.java b/src/javax/servlet/jsp/jstl/sql/ResultImpl.java
index 13f12ff..c7594aa 100644
--- a/src/javax/servlet/jsp/jstl/sql/ResultImpl.java
+++ b/src/javax/servlet/jsp/jstl/sql/ResultImpl.java
@@ -68,7 +68,7 @@
// Create the column name array
columnNames = new String[noOfColumns];
for (int i = 1; i <= noOfColumns; i++) {
- columnNames[i-1] = rsmd.getColumnName(i);
+ columnNames[i-1] = rsmd.getColumnLabel(i);
}
// Throw away all rows upto startRow