> First of all, thank you so much Alexander for taking the time to explain
> this so thoroughly.

 *bow*

> Now, since each JSP is essentially a servlet, how does the
> servlet perform
> the sharing of the javabean ? Does a servlet that shares a
> javabean (similar
> to the JSP case [d] above, where scope="application"), is
> actually creating
> the javabean as a *static* variable so that it is shared by all
> members of
> the class ?

Sorry, but I have never done servlets, but you may try this for yourself.
Create such a jsp page and access it, then go to tomcat/work and look for
the corresponding .java file and study it. Please post your results, I don't
have the time to look for myself today...

> Great, that's what I thought.  But here's why I'm getting confused. The
> servlet tutorial says that a servlet is created once and once
> only (that's
> when the init() is run).
> http://java.sun.com/docs/books/tutorial/servlets/lifecycle/index.html
> If the servlet class is created only once, how does Tomcat then create
> multiple instances of the class ?

In that case, I think Sun might be right ;-) As I said, I have never done
servlets, the above is just what I suspected...

Bye,
Alexander


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to