• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enums in JSPs

 
Ryan Kade
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did some searching both in the forums and Google and didn't find a good answer to this question: how do I access an enum using EL in JSP? Is it even possible?

If I have an enum:



I'd like to be able to access it in the JSP:



Any suggestions?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not possible. The EL is geared towards beans and their properties.

I came up with a solution for class constants as outlined in this article, perhaps a similar tactic for enums would work?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic