Meaningless Drivel is fun!*
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 Android Security Essentials Live Lessons this week in the Android 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: 60785
    
  65

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Expression Language not evaluating generic Java Map and list as desired
 
Similar Threads
special characters in JSTL
Using EL to retrieve bean values
Using JSTL Data Displayed In Browser Is Getting Fixed To 24576 Bytes(24 KB)
Object does not support property error!
Need help with JSTL: setting end attribute dynamically of "substring" tag