- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the use of Cookie or hidden fields in JSP?
Cookies
A webserver can assign a unique session ID as a cookie to each web client and for subsequent requests from the client they can be recognized using the received cookie.
This may not be an effective way as the browser at times does not support a cookie. It is not recommended to use this procedure to maintain the sessions.
Hidden Form Fields
A web server can send a hidden HTML form field along with a unique session ID as follows −
<input type = "hidden" name = "sessionid" value = "12345">
This entry means that, when the form is submitted, the specified name and value are automatically included in the GET or the POST data. Each time the web browser sends the request back, the session_id value can be used to keep the track of different web browsers.
This can be an effective way of keeping track of the session but clicking on a regular (<A HREF...>) hypertext link does not result in a form submission, so hidden form fields also cannot support general session tracking.
- Related Articles
- What is the use of Action in JSP?
- What is the use of tag in JSP?
- What is the use of tag in JSP?
- What is the use of tag in JSP?
- What is the use of jsp plugin action element?
- What is the use of jsp text action element?
- What is the use of page object in JSP? Need an example.
- Use IFrame and read cookie in ABAP
- What is the meaning of a Persistent Cookie in PHP?\n
- Check whether the file is hidden or not in Java
- What is the function of action in JSP?
- Determine if File or Directory is hidden in Java
- What is the shortest function of reading a cookie by name in JavaScript?
- What is the purpose of taglib directive in JSP?
- What is the session Object in JSP?
