• Post Reply Bookmark Topic Watch Topic
  • New Topic

Not able to read value of map attribute in jsp  RSS feed

 
somashaker goud
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
below is my controller class



jsp



IN controller for Added variable I am assinging value as Added successfully but while trying to display in jsp its getting displayed as {Added}

let me know where I am missing
 
Tim Nachreiner
Ranch Hand
Posts: 36
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just guessing, but I think it's because you used: instead of
 
somashaker goud
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim, I tried that too but it didn't worked
 
Tim Nachreiner
Ranch Hand
Posts: 36
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how about
 
somashaker goud
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, it worked. Thanks
 
Tim Nachreiner
Ranch Hand
Posts: 36
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On another note,  because you are using field injection:



You can get rid of this line:


 
somashaker goud
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks good catch
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!