• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using EL with Array  RSS feed

Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a JSP which simply list out all the application scope attributes and its class type. Recall that we have 'Object.getClass()' returning a 'Class' object which in turn has a 'Class.getName()' returning the name of the class. So this EL should list the class type of ANY object 'obj':


But, if obj is an array - which is just an object - the above syntax doesnt seem to work (at least in tomcat) because EL expects array must have index rather than property. So this must be used:


So what would be the correct way to get the class type name for array using EL?
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
Rocket Oven Kickstarter - from the trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!