tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Rosenberg" <rosenberg.l...@googlemail.com>
Subject Re: get servlet instance
Date Sat, 28 Jul 2007 19:11:47 GMT
you could save the instance in a static variable, which would be very
bad style, but would work.
A better style would be to use the application or session scope
(depending on the nature of the cached information) for inter-servlet
communication. Or a third class which can make the shared information
accessible by both servlets.

regards
Leon

On 7/28/07, Skijor <skijore@yahoo.com> wrote:
> How to I obtain a reference to a servlet from another
> servlet?  For example, I want to call a public method
> on another servlet because that servlet has cached
> information I need.
>
> Thanks
>
>
>
> ____________________________________________________________________________________
> Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
> http://farechase.yahoo.com/
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message