Results 1 to 2 of 2

Thread: Sessions

  1. #1
    Billywizz is offline Member
    Join Date
    Jan 2011
    Posts
    57
    Rep Power
    0

    Default Sessions

    Ok, How can i store something in a session variable? I want to store the user ID after they have logged in?

    And how do i use that something stored in the session variable (user_ID) in other servlets and JSP's in my project.

    Thanks

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    6

    Default

    See the following API pages:
    HttpServletRequest (Java EE 6 )
    HttpSession (Java EE 6 )
    To set a Session attribute, call request.getSession().setAttribute(...) (or getAttribute to retrieve).

Similar Threads

  1. sessions doubt
    By anilarava in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 11-16-2010, 01:22 PM
  2. Kill sessions
    By Subscribe.name in forum Java Servlet
    Replies: 1
    Last Post: 10-05-2009, 10:22 PM
  3. problem with sessions
    By lisa.lipsky in forum JavaServer Pages (JSP) and JSTL
    Replies: 6
    Last Post: 09-09-2009, 01:46 AM
  4. Sessions in jsp
    By Ed in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 07-02-2007, 03:46 PM
  5. sessions in jsp
    By Heather in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 06-30-2007, 03:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •