>
> >Also, note that if a user starts a new browser process, that browser will
> >get a new session no matter what you do. In fact, that's how I support
>
> Do you mean for example start once Netscape and then IE ? Because that's
far

No -- session cookies are kept in process memory for the browser, so if you
start a new browser process it will get it's own session. When I want to do
rudimentary "simultaneous access" testing, I start two IE processes and hit
the same page.

> >Perhaps you could create a simple session
> >management bean that listens for the session binding event, and
initializes
> >a Hashtable of sub-sessions? If you're using model2 architecture, you
could
> >guarantee that all served pages include a sub-session identifier in their
> >URLs. I'm not sure how you'd support creation of new sessions -- perhaps
> >through an explicit menu item in your app?
>
> This is exactly the problem. As I use the same url (remember, subdomain)
the
> new sub-session would probably replace the session environment for all
pages
> for this domain, because the session cookie is linked with the url. I'm
not
> quite sure, so I will test it anyway.

I meant that the "sub-session" would be an object you keep in a hashtable
for lookup. Each user would have only one real session, and the information
which you wanted to be different between sessions would instead be stored in
these objects -- one object for each sub-session or virtual session. The
URLs output by the Model2 servlet could include a portion such as
"?session=1" (if you're using GET parameters to identify the session) or /1/
(if you're using extra path info to identify the session), and any time the
users hit a URL the Model2 servlet handling all accesses would strip out the
session identifier, look it up in the hash table and use the retrieved
object as the source of all info for that particular page access -- perhaps
by putting it into the request object as a request-scope bean.

Pages on your site could then access the request-scope bean as if it
contained session-scope information.

In fact, if you didn't feel like writing a new bean, perhaps you could
instantiate instances of HttpSession somehow and use them as the sub-session
beans.

_3
M

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to