Thanks Pierre. Finally it works!
Dumping the session helped. I should have thought of that ;)
It happens the values were stored in the session in uppercase, and I was trying to retrieve them in lower case. That is why it appeared it wasn't working.
Thanks.
Also, just related but might as well tag on to this, whenever I attempt to use the logger instead of println, i don't see the results get printed. I modified logback.xml to log the packages under which my simulations live, but still no luck.
Does anything need to be done specially to get that to work?
eg.
val logger = org.slf4j.LoggerFactory.getLogger("myDebugLogger")
in logback.xml
<logger name="samples" level="DEBUG"/>
with my simulations under samples package.