Java Servlets
Java Servlets
Servlets
Java Servlets, Sessions, Cookies &
XML Fundamentals
Presented by: S. Karthikeyini
Server-Side Programming: Java Servlets
Cookies are small pieces of data stored on the client-side. Cookies are small
pieces of text information sent by the server to the client (browser) and
stored there. On every subsequent request to the same server, the browser
sends those cookies back.
Explanation
Real-Life Analogy
• response.encodeURL("yourPage.jsp") helps
maintain sessions without cookies.
• It’s a built-in solution in servlets for URL-based
session tracking.
• Helps maintain user state even when the
browser blocks cookies.
• Let me know if you want a visual flow or a full
servlet example using this!
XML Basics
XML Basics
Structuring Data
• XML is used to store and transport data in a
structured format.
Example:
<student> <name>Alice</name>
<age>22</age></student>
XML Schema Documents (XSD)