File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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: 61417
    
  67

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Expression Language not evaluating generic Java Map and list as desired