aspose file tools*
The moose likes JSP and the fly likes Enums in JSPs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Enums in JSPs" Watch "Enums in JSPs" New topic
Author

Enums in JSPs

Ryan Kade
Ranch Hand

Joined: Aug 16, 2005
Posts: 69
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

Joined: Jan 10, 2002
Posts: 61222
    
  66

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?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: Enums in JSPs