> Can someone explain how the multiple (concurrent) requests are handled
>     by the Web-server/Servlet-engine with regards to Servlet/JSP/JavaBeans ?

To save object creation time, the servlet engine creates the servlet class only
ones, and doles out the same stuff to all requests that come in. Well, the above is
almost correct... since (look down...)

> I would obviously like each user to be able to make his own query and see
> his private results.
> If I run this Servlet from one browser and then from another (browser) on
> different machine,
> I see the same data that is being displayed to the first user. This shows
> there is only one instance of Servlet object.

You can have your servlet implement SingleThreadModel to force the engine to create
a separate object for each request.

>
>
> I have NOT used sessions. I believe Sessions are supposed to help here. But
> how ?

Yes. I think there's been a reply to this effect from somebody. This is the better
approach for a high volume site. This does not require SingleThread-ing.

> How does it work when I have JSP and JavaBeans ?

To enable single threading, specify in the page directive isThreadSafe = "false"

>
> How many JavaBeans (objects) are created when I <jsp:useBean /> a JavaBean
> at a Request/Session/Application scope ?
>

Depending upon the scope attribute.

- Uddipan.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to