File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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

Joined: Jan 10, 2002
Posts: 63852

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] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Enums in JSPs
It's not a secret anymore!