"application" is an instance of javax.servlet.ServletContext which is
available in JSPs; this object has application scope and therefore is a good
place to store objects [with: application.setAttribute(name, object) ]
which you want to make available to servlets/JSPs throughout an application.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Andy Chapman
Sent: Wednesday, March 28, 2001 2:39 AM
To: Orion-Interest
Subject: Re: Paged search results
Johan,
Please enlighten me - what is the application object that you refer to? Is
it just a single entity EJB that maintains common state - ie caches,
application settings etc? Is there some discussion of it anywhere as an
element of J2EE application design?
Thanks,
Andy
----- Original Message -----
From: "Johan Fredriksson" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 8:17 AM
Subject: Re: Paged search results
> My first thought is that a cache should not be stored in a session, since
> that would only be available in that session and "cannot" be shared...
> Better to store a searchresult in the application object ( if the result
is
> static and is the same for all users). If the searchresult is specific to
a
> certain user, then you could store it in a session.
>
> For multibrowser usage, there will be separate sessions for those. There
is
> probably a way to get them to use the same session, but I haven't tried
> this. In this case I suggest a hashtable in the application object and an
id
> string ( key in hashtable ) in the session.
>
> Hope this at least gives you a couple of ideas on how to get started.
>
> regards
>
>
>
> Johan