Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

For JSTL + EL experts  RSS feed

 
Dan Nun
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the example:


I have an object that has a map ( myMap ), where myMap holds another map(acessed a entry with "key2"). I can get the value using common EL outside JSTL tags, but when I try to use <c:if test="...it fails saying:





What could this be? When I use<c:if test="${!empty myobject.myMap}"> it works....damN!
[ June 16, 2008: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65828
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's in column 63 of the failing line?
 
Dan Nun
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know. When I compile in the IDE I can't see the source code generated by the JSP. There's no way for me to know this, sorry...

But....I've manage to make it work. I switched all the (") characters in the <c:if tag using map objects to (') characters. Now it's all working. I didn't even know that we could use this character =)

But thank's anyway...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65828
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
test="${!empty myobject.myMap["key1"]}"


If you use the quote character to delimit the attribute, then yeah, you need to use ' inside or the parser thinks that your quote is being closed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!