tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Curwen" <mi...@gb-im.com>
Subject RE: Retrieving the context path from a standalone class
Date Thu, 08 Jan 2004 15:48:30 GMT

> -----Original Message-----
> From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com] 
> Sent: Thursday, January 08, 2004 7:36 AM
> To: Tomcat Users List
> Subject: RE: Retrieving the context path from a standalone class
> 
> 
> 
> I took a look at lucene's indexing code.  It seems like you 
> can construct an Analyzer from a Reader (so an 
> InputStreamReader constructed from the InputStream returned 
> by ServletContext#getResourceAsStream
> would work), and then use a RAMDirectory as the IndexWriter's 
> Directory argument.  Alternatively you an use an FSDirectory 
> if you want to save the index to disk, use the one directory 
> where the container will let you write, the directory 
> accessible via (File) 
> servletContext.getAttribute("javax.servlet.context.tempdir");
> That should work, no?
 
Won't that index the JSP source ?


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message