Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

session object question put vs. putValue vs. setAttribute?

843835Sep 18 2002 — edited Sep 18 2002
I have the following code:

<%@ page import="java.util.*" %>
<jsp:useBean id="EducationBean" class="java.util.Hashtable" scope="session" />

<%
String swCurrFileName = "swcontrol.jsp";
Enumeration params = request.getParameterNames();
while (params.hasMoreElements()) {
String name = (String)params.nextElement();
EducationBean.put(name, request.getParameter(name));
}
%>

My question is I can't find any documentation on the put command, whats the difference between 'put', and 'putValue', and 'setAttribute'? When I try using the 'putValue' or 'setAttribute' command I get errors.

What I'm trying to do is store form values in a session object across several pages, and on the last page display all the form values from the previous pages.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2002
Added on Sep 18 2002
3 comments
322 views