Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

adding value to a map present in a scriplet in a jsp page  RSS feed

 
Harshit Rastogi
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am trying to add a label value to a map using




this line is giving me the error, what is the correct way to add.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66186
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Harshit Rastogi:
this line is giving me the error, what is the correct way to add.

Oh no! Not "the error"!
 
Patricia Samuel
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rastogi,

You should write

<% map.put("key1",label1);%>
What is the idea behind using experssion in a scriptlet??
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!