• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » JSP » Session » What is Session Tracking?
Next →
← Prev

What is Session Tracking?

By Dinesh Thakur

The form page prepared using .html file is called source form page (fixed content).The form page that comes as response generated by servlet or JSP program is called dynamic form page (dynamic content). Instead of asking all the details of end user in a single form page, it is recommended to ask those details in multiple form pages.

However, one big problem with it is that, the details entered in a particular form page cannot be accessed or retrieved in any other or even in the successive pages, because HTTP is a stateless protocol. This means every time a client sends a request a new connection is established and the previous request data lost. For example, in online shopping when we want to add a number of items to our cart, the online store’s server have to make a record of the items which will be used during purchase. This is where session tracking comes to play. Session tracking is tracking of client data throughout the session and across the form pages.

Figure shows static form page that the end user needs to read and answer some unnecessary question, when he selects or deselects the marital status checkbox. To overcome the problem, the working with dynamic form page is shown.

In Figure the content of form page2 is dynamic and generated by Srv1 program based on the marital status value of —– or request1 data.

All web applications are stateless web applications by default, which means —- cannot remember client data across the multiple requests during a session.

                    Bad Designed Form Page

                     Working with Dynamic Form Page

A session is a set of continuous and related operations (requests) — on the web application by a client (browser window / end user).

By stateless behavior of web application we mean that while processing current request in any web resource program, we cannot use previous request data, which means while processing request2 we cannot use request2 data as shown in Figure.

Web applications are stateless because the protocol http is given as stateless protocol. According to this, one new connection will be created between browser window and web server for every request and this connection will be closed automatically, once related response goes to the browser window.

Example

If browser window gives 10 requests to a web application, 10 connections will be created between browser window and web server. Due to this one connection related to a client’s request data cannot be used in an other connection related to the client’s request processing (that means we cannot use previous request data in web resource program while processing current request).

By placing <form> tag, <input> tag in pw.println( ) statements of servlet program we can generated dynamic form page from that servlet program. In naukri.com registration process multiple forms will be there. The first form page is static form page and other form pages are dynamic form pages. Based on the data given in form page1 the questions in form page2 will be rendered. Similarly, based on data in form page2 the questions in form page3 will be rendered.

Web applications are stateless because they are using a stateless protocol called.

You’ll also like:

  1. Session Tracking Using Cookies
  2. HTTP Session with Cookies
  3. HTTP Session with Url Rewriting
  4. Session Management
  5. SIP- What is the Session Initiation Protocol (SIP)?
Next →
← Prev
Like/Subscribe us for latest updates     

About Dinesh Thakur
Dinesh ThakurDinesh Thakur holds an B.C.A, MCDBA, MCSD certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps.

Dinesh Thakur is a Freelance Writer who helps different clients from all over the globe. Dinesh has written over 500+ blogs, 30+ eBooks, and 10000+ Posts for all types of clients.


For any type of query or something that you think is missing, please feel free to Contact us.


Primary Sidebar

Java Server Pages

Java Server Pages

  • JSP - Home
  • JSP - Advantages
  • JSP - Architecture
  • JSP - Life Cycle
  • JSP - Servlet Disadvantages
  • JSP - PrintWriter Vs JspWriter
  • JSP - Session Tracking
  • JSP - Stateless Protocol
  • JSP - Hidden Form Fields
  • JSP - Program Structure
  • JSP - Bill Discount Program
  • JSP - Scripting Elements
  • JSP - fn:length()
  • JSP - fn:split()
  • JSP - fmt formatNumber Tag
  • JSP - Servlet Communication
  • JSP - fn:replace()
  • JSP - fmt:parseNumber Tag
  • JSP - fmt:parseDate Tag
  • JSP - fn:substring()

Other Links

  • JSP - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW