Hello everyone,
I'm using jsp1.0 and I'm having some trouble. It seems that everyone
that goes to my jsp-pages share the same bean, which I do not want. I
want everyone to have their own bean, sort of a user-bean which stores
information about a specific user. This is what I've tried to do, but
which doesn't work.
index.jsp
<jsp:useBean id="bean" class="bean.Bean" scope="session" />
...
<body>
<%
session.putValue(session.getId(),bean);
%>
on another page, let's say index2.jsp I have:
<jsp:useBean id="bean" class="bean.Bean" scope="session" />
...
<body>
<%
bean=(bean.Bean)session.getValue(session.getId());
%>
Now this doesn't work. All users will share the same bean. For example
on the first page I set a value in my bean depending on the user, but
the problem is that all user's with that type of bean will be given that
value so when they go on to another page (or reload the current page)
the information will be displayed differently, regardless of what their
value was before. What am I doing wrong??? How can each user get their
own instantiation of the bean???
/Tommy
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".