wood burning stoves 2.0*
The moose likes JSP and the fly likes Expression Language not evaluating generic Java Map and list as desired Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Expression Language not evaluating generic Java Map and list as desired" Watch "Expression Language not evaluating generic Java Map and list as desired" New topic
Author

Expression Language not evaluating generic Java Map and list as desired

Jignesh Gohel
Ranch Hand

Joined: Dec 28, 2004
Posts: 276
Hi,

Following are my code snippets.

In my controller



YGUser.java is a Java Bean.

In my JSP Page:




UserType.java


Output:



When accessing the Map set in request attribute using EL in JSP it is not getting evaluated as desired.
Can anybody please help me in making it work or guide me in case I am wrong in using the syntax?


Regards,
Jignesh

The Art Of Life Is To Know When To Be Useless And When To Be Useful - CHUANG TZU
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61086
    
  66

The EL cannot evaluate enums.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sean Clark
Rancher

Joined: Jul 15, 2009
Posts: 377

I'd just map it as a string

and set the string as


Sean


I love this place!
Jignesh Gohel
Ranch Hand

Joined: Dec 28, 2004
Posts: 276
Thanks Bear and Sean for your guidance.I made the changes suggested by you people and it is working now.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Expression Language not evaluating generic Java Map and list as desired