Results 1 to 2 of 2

Thread: sessions doubt

  1. #1
    anilarava is offline Member
    Join Date
    Nov 2010
    Rep Power

    Default sessions doubt

    i opened one browser and typed one jsp page in the one form is there in that one only username is there i typed that username and clik on submit and navigate to another page
    <FORM METHOD=POST ACTION="SaveName.jsp">
    What's your name? <INPUT TYPE=TEXT NAME=username SIZE=20>

    SaveName.jsp :

    String name = request.getParameter( "username" );
    session.setAttribute( "theName", name );
    <A HREF="NextPage.jsp">Continue</A>

    NextPage.jsp shows how to retrieve the saved name.

    Hello, <%= session.getAttribute( "theName" ) %>

    here my doubt is i opened another browser and getting the same user is it possible

  2. #2
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Rep Power


    If you open two browsers (both the same browser, that is both IE or both Firefox) on the same machine they will have the same session id, since they will be looking at the same cookie.

Similar Threads

  1. Kill sessions
    By in forum Java Servlet
    Replies: 1
    Last Post: 10-05-2009, 10:22 PM
  2. problem with sessions
    By lisa.lipsky in forum JavaServer Pages (JSP) and JSTL
    Replies: 6
    Last Post: 09-09-2009, 01:46 AM
  3. Http Sessions
    By manasa in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 03-29-2008, 11:51 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