Hi,

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

My environment: HP-UX, JRun 2.3.3 (Build-154) as Web server & Servlet
engine.

I have a simple application where a single Servlet is called repeatedly to
(first) query the database and
 then to display the results one record at a time. (Bad design ? well, it
was my first app.)

This Servlet makes the Database query and stores records into a Vector,
 which are then displayed (one at a time) on successive invocations
depending upon the "Next|Prev" buttons.

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.

I have NOT used sessions. I believe Sessions are supposed to help here. But
how ?
Do I have to create different Vector per Session-ID or one Servlet object
gets created per session ?

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

I haven't seen ANY talk about it in all the discussion that goes on here or
in any of the examples on the web either.
Is this a no-issue ?

Thanks,

- Rajesh

===========================================================================
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