On Oct 5, 2005, at 2:09 PM, Cyril Barlow wrote:
I'm really confused on the dilemma here.

You can create a startup hook using one of the Servlet specification
listeners, create an IndexSearcher there, stuff it into application
scope (context.setAttribute()).

There is no digging into Jetty's guts needed, just plain and simple
servlet API will suffice.

Of course you'll also want a facility to re-instantiate the
IndexSearcher if the index is changing, but that is just building
upon the pieces I just described.


OK, I add a IndexSearcher object using the context.setAttribute(IS) but how
do I refer back to it from the servlet code?

Uh... IndexSearcher searcher = (IndexSearcher) context.getAttribute ("<some key>")

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to