That is exactly what the HttpSession class is intended to be used for. You could store a Hashtable in which the question answer is keyed by the question name. The
servlet engine automatically keeps track of session objects for you using cookies.
HttpSession session = request.getSession( flag );
You get a session from the request object, if flag= true, a new session will be created if none exists, otherwise you get null if none exists.
A HttpSession acts like a Hashtable with objects stored by name, the only limit is available memory.
In a
jsp there is a session object that is handled automatically.
Any good book on servlets and JSP will fill in the details.
Bill
------------------
author of: