What is the Main Difference Between a Session and Cookie in JSP ?

A Session is always stored at the Server side. In JSP, session is a built-in object in JSP container..

A Cookie is always stored at the client side.

We can use both the methods for Session tracking. But Cookie method needs permission from user for storing cookie at the client location.



You May Interest

What is the Difference Between sendRedirect and forward in a JSP ...

What are the Thread-safe Classes in Java Collections Framework ?

What is a Singleton Class in Java ?

What are the Atomic Operations in Java ?

Why Do We Use Static Initializers in Java ?