Hmm.. The question seems to indicate there are exactly three kinds of
jsp: one.jsp, two.jsp, and three.jsp. And any particular user can fall
into exactly one of these three categories.. If this is so, why not create
three differently named session vars, say, loginOne, loginTwo, loginThree.
If the user is type 1, set the session var loginOne to some val., and clear
out the other two session vars.. if user is of type 2, set session var loginTwo,

etc. Then at the top of one.jsp, make sure the user has the session var l
oginOne set, at the top of two.jsp, make sure the user has session var
loginTwo set, and similarly for three.jsp. Wont that do the trick?

Apologies in advance if i have missed something crucial.
Geeta


"Mr. Qi Luo" wrote:

> Sathya,
>
> That is called mission impossible, because session is used for your server
> to uniquely identify a remote user.
>
> Qi Luo
> Sr Software Engineer
> New York
> -----Original Message-----
> From: Srini Sathya. [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 12, 2000 12:28 PM
> To: [EMAIL PROTECTED]
> Subject: How to handle session across multiple users
>
> Hi all,
>
> I have a login.jsp page which creates a session and put some values in it.
> Depending upon the login i need to create the jsp pages in the fly.  I have
> 3 different types of jsp pages to be created for example:
>
> if the user name is one then i will create one.jsp
> if the user name is two then i need to create two.jsp etc.,
>
> My problem is that since i am creating the session in the login.jsp a user
> who logged as one can now able to access the details of the two too.
>
> I have restricted in the main page of all the users whether a session exists
> and then if not asking them to login.  But now one user is logging as one
> and he can able to change from one to two.  How to prevent this??.  Should i
> create multiple sessions or is there any workaround for this.
>
> Thanks a million for ur help.
> Srini
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to