You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Randy Layman <ra...@aswethink.com> on 2002/02/28 15:16:41 UTC
RE: Scope / Instantiation of JSP pages / declarations
see intermixed....
> -----Original Message-----
> From: Thorsten Barth [mailto:barth@web-arts.de]
> Sent: Thursday, February 28, 2002 9:55 AM
> To: Tomcat Users List
> Subject: Scope / Instantiation of JSP pages / declarations
>
>
> If two requests are accessing the same page at the same time,
> this messes
> all up, so I would like to change this behaviour. I searched
> Suns JSP specs
> and the tomcat documentation, but I just found an attribute
> in the page
> directive that forces serialization of the requests
> (threadsafe="false") -
> but I think that would significantly reduce performance...
Yes it would.
>
> Do you know
> - if and why the current behaviour of tomcat is intended?
Yes - it keeps memory consumption down (instead of having thousands of
instances of the JSP class for thousands or requests, you have only one)
> - where I can search for more info?
The JSP Spec and Servlet Spec would probably be good resources
> - if there is an option that tells Tomcat to create a new
> instance of JSP
> pages every time they are called
I don't believe so
>
> P.S: Allaire JRUN seems to behave different ....
If so then it doesn't comply with the JSP spec.
One thing to remember is that only variables declared in the <%! ...
%> blocks and page scoped beans are shared between requests. If you want
variables that are used only in the scope of one request then either use <%
... %> blocks or set your bean scope to request.
Randy
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>