Is there anyway I can convert a Map to a POJO that I can then use in JSP EL? Maybe with reflection or something? I don’t want to have to manually create a new class for every new collection of properties.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s no need to do so. EL can perfectly access maps.
Or if the key contains dots:
You can even access it using dynamic keys: