This Question is Answered

1 "helpful" answer available (2 pts)
3 Replies Last post: Mar 23, 2014 11:32 AM by Behrang Saeedzadeh  
Behrang Saeedzadeh Newbie 88 posts since
Apr 24, 2003
Currently Being Moderated

Mar 20, 2014 11:07 AM

Cannot resolve property or method (dynamic property?) when using maps in JSP EL expressions



We have a chunk of code like this in a JSP file (yeap, damn ugly scriptlets):



     Map<String, String> fooMap = new HashMap<String, String>();

     fooMap.put("cssClass", "...");


<c:set var="fooMap" value="<%= fooMap %>" />

<div class="${fooMap.cssClass}">




IDEA marks ${fooMap.cssClass} in orange can complains that "Cannot resolve property or method (dynamic property?)"


Before filing a bug report I wanted to see if there's a way to suppress this warning for maps or if I am missing something.




Alexander Chernikov JetBrains 1,360 posts since
Jan 11, 2007

Thank you.


For me the warning has gone, when there is no space between opening "<%=" and fooMap reference in c:set element.


However, if the JSP works with space (have not checked it yet) then it is clearly a bug. Will check and search the bugtracker.


Common workarounds like turning inpection off or adding a comment (check quick fix options) are available.




Alexander Chernikov JetBrains 1,360 posts since
Jan 11, 2007



Maps do not matter. The same occurs with regular beans. The essential condition is the space I referred before.


Thank you for reporting,


More Like This

  • Retrieving data ...