session tracking

Posted on 2006-05-18
Last Modified: 2010-04-01
I have read two books on session tracking. It simply says it has four steps
create session object
close session

My doubt is I am not knowing how to track session using this input type is hidden. If anyone could show me how to track session for three different pages i.e carrying data from page one to page two and add some more data of page 2 to that of page three and carry from page two to page three.
Question by:rmvprasad
    LVL 11

    Accepted Solution

    1.   You can carry data from page 1 to page 2 , u can access page 1 values in page 2 by request and store it in hidden , again after submitting second form , u will get values in page 3.
      2. If you want to use session object,set value in session.setAttribute in page 1 and
    get that attribute in page 3 direct by session.getAttribue,

    LVL 3

    Expert Comment

    You can set the name of the session value by

    session.setAttribute("page1", value);
    session.setAttribute("page2", value);
    session.setAttribute("page3", value);

    How about that?

    Author Comment

    I know that it is create session object, setattribute, getattribute and finally close the session object. But i am not able to do in code. I will be really pleased and thankful if you could show a small some sample code
    LVL 11

    Expert Comment

    <%@ page session="true" %>

    to get
     String value=(String)session.getAttribute("Param1");

    Hope this helps.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Suggested Solutions

    Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
    PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now