el表达式无法获取数据的运行时类getClass()

如题 运行时报错500

 HTTP Status 500 – Internal Server Error

Type Exception Report

Message An exception occurred processing JSP page /el2.jsp at line 11

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /el2.jsp at line 11

8: </head>
9: <body>
10: 
11:     names: ${paramValues.name[1].class}
12: 
13: </body>
14: </html>

如果去掉.class可以获取数据
即:names: ${paramValues.name[1]},这样可以获取,为什么无法获取.class

.后面跟的是属性名~你本意是想获取Class Name,然而 jsp解析成name的class属性了,这是语法规则,没什么行不行的,你得遵守套路啊,兄弟

换成 .getClass() 试试