Could you send a pointer to the jsp example that Doug posted?  I'm looking
at developing jsp's with lucene, and Doug's input would be invaluable.]

Rob
----- Original Message -----
From: "Brian Rook" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 16, 2002 11:35 AM
Subject: excluding directories and using lucene in servlets


> I have a really simple servlet example already created that appears to
work.
> I adopted most of the code from the .jsp example posted earlier from
> Douglass Cutting.  However, I have two questions:
>
> First, (this is related more to the servlet aspect) in the .jsp file there
> are a couple of lines of code that deal with the 'application' variable:
>
> i.e.  indexPath = application.getRealPath( "/" + index );
>
> apparently I need this code in order to create the index sercher by giving
> it the physical path to the index that I'm going to use.  I need to
> reproduce the application variable inside the servlet.  I'm using a
(really
> bad!) work around currently that uses a hidden field in the query form
page
> to store the index path (using the application variable).  I have found
that
> the application variable is related to the servletContext property of the
> HTTPServlet class.  Does anyone have an idea of how to instantiate this
> inside a servlet?  Any information related to struts would be of
assistance
> as well as the perform method only gives you access to the request and
> response objects.
>
> Second, is there anyway to exclude directories from being indexed?
>
> For example, I need an index of everything in the /doc directory but not
> items in /doc/restricted directory.
>
> I'm thinking that you should be able to do this at creation time, or
> removing them after, but perhaps I could settle with creating the query
and
> removing items that are located in that directory.  Does anyone have any
> suggestions on how to accomplish this?
>
> Once I get my app running correctly, I'll post the code that I used in my
> servlet example.
>
> Thanks.
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


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

Reply via email to