3 Replies Latest reply on Mar 28, 2013 10:00 AM by gimbal2

    can we access the session scoped variable by simply using its name

    Moazzam
      The Java EE 6 Tutorial contains a "Duke's Bookstore Case Study Example”. I could not understand following statements of this case study:

      *bookdetails.xhtml*

      {code}
      <h:outputText value="#{selected.title}"/>
      {code}

      *BookstoreBean.java*

      {code}
      public String details() {
      context()
      .getExternalContext()
      .getSessionMap()
      .put(
      "selected",
      getFeatured());

      return ("bookdetails");
      }
      {code}

      I want to know can we access the session scoped variable in bookdetails.xhtml by simply using its name as done above?