Discussions

Web tier: servlets, JSP, Web frameworks: Using session object in a JSP page.

  1. Using session object in a JSP page. (3 messages)

    Please explain to me how to use session object in a JSP page. For example I am trying to create a hash table and store it in a session object to access it in another page.

    Thanks, Saad.
  2. Using session object in a JSP page.[ Go to top ]

    There is an implicit session object associated with every JSP page .The object name is "session".U just need to say session.putValue("someName",urHashTableObject);
    The above code will store the hashtable in the session.Then to access it on the next page,just say
    session.getValue("someName");
      I think this will solve ur problem.
  3. Using session object in a JSP page.[ Go to top ]

    Thank you it worked.
    Do I need to put the following in the page directive tag "session=true".

    Saad.

  4. No -the default is true
    andrew