title: play 2.1-- save and retrieve variables in session scope in both java controller and scala template
body: <p>i am very new to play framework and started using play2.1 with Java.
  My query may be basic but couldnt find in the documentation and with search and tried many ways...</p>
  
  <p>I want to know how to save and retrieve a variable in session both in java controller and scala template...</p>
  
  <p>below is one of the ways i tried..</p>
  
  <p>public class Application extends Controller {
      static Form userForm = Form.form(User.class);</p>
  
  <pre><code>public static Result index() {
      play.mvc.Controller.session("accStatus",0);
      return ok(index.render());
  }
  </code></pre>
  
  <p>but the problem with this is , dont know how to retrieve accStatus from session in scala template...</p>
  
  <p>can some one look into this and guide to do...</p>