How can we register the variables into a session?

How can we register the variables into a session?

How can we register the variables into a session?

View Answers

November 12, 2010 at 2:48 PM

Hi

If u maintain the data along with the many request ,then we need to maintain the session. if u want to maintain the session,first u can create session given below

HttpSessio session=ServletContext.getSession();

if u want to put the data in session,Then

session.setAttribute("key","value");//here key and values are same

if u want to get the data from session,then

session.getAttribute("key");

Like that u can maintain the session









Related Tutorials/Questions & Answers:
How can we register the variables into a session?
how can i make monthly register ?
Advertisements
ModuleNotFoundError: No module named 'session2'
ModuleNotFoundError: No module named 'session3'
How to register for SCJP 6 certification ?
How can we destroy the cookie?
How to Register Custom MBeans in Tomcat5.5
How to register domain name for my Company?
How can we repair a MySQL table?
How can we know that a session is started or not?
How we can create a table through procedure ?
how can we store the encrypted passwaord in swings?
how we can create website through java
How can we get hibernate statistics?
How can we save a data list in jsf?
sessions
How can we destroy the session, how can we unset the variable of a session?
How can we solve this puzzle using java ?
how to initialise variables in jsp?
sessions
sessions
Sessions
Variables
How can we create a database using PHP and mysql?
How many ways we can give the output to a browser?
How can we encrypt the username and password using PHP?
How can we increase the execution time of a php script?
what is cloud computing? any how we can implement?
How can we submit a form without a submit button?
how can we prevent back option after log out.
How can we know the count/number of elements of an array?
sessions - JSP-Servlet
How many ways can we get the value of current session id?
How can we get second of the current time using date function?
how can we pass parameters from jsp href to another servlet
How can we find the number of rows in a result set using PHP?
How many cookie object we can store in a session? is there any limit?
ModuleNotFoundError: No module named 'sessions'
PHP Variables Using Arithmetic Operators
How can we implement Pop-up in JQuery without Plugin?
Kotlin Variables
ModuleNotFoundError: No module named 'register'
How to make a CRUD without using SQL Server? by just using your GUI? (CRUD = Creating, Register, Update, Delete)
how to get javascript variables into jsp - JSP-Servlet
What is the maximum size of a file that can be uploaded using PHP and how can we change this?
How to Register Domain Name?
ModuleNotFoundError: No module named 'dj-sessions'
ModuleNotFoundError: No module named 'lmdb-sessions'
ModuleNotFoundError: No module named 'sessions-telethon'
ModuleNotFoundError: No module named 'telethon-sessions'

Ads