You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Benson Fang <pl...@gmail.com> on 2004/12/05 07:36:45 UTC
I can't make index for .jsp files with IndexHtml!
Hail everyone,
I am Benson, and this is the first time I raise question via Lucene Users List.
I got a problem: Everytime I try to make an index with IndexHtml for a
directory under Tomcat webapps which includes .html and .jsp files, it
only scans for .html files, but not .jsp files. However, it works
while I make index with IndexFiles.
My command under DOS is as following:
java org.apache.lucene.demo.IndexHTML -create -index /opt/lucene/index
../SampleDirectory
(where 'SampleDirectory' is the name of my target directory)
Thank you!
Benson Fang
--
ankh wdj3 snb
"life, prosperity, health"
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: I can't make index for .jsp files with IndexHtml!
Posted by Benson Fang <pl...@gmail.com>.
On Sun, 5 Dec 2004 03:12:37 -0500, Erik Hatcher
<er...@ehatchersolutions.com> wrote:
> On Dec 5, 2004, at 1:36 AM, Benson Fang wrote:
> IndexHTML has this in its source code:
>
> if (file.getPath().endsWith(".html") || // index .html files
> file.getPath().endsWith(".htm") || // index .htm files
> file.getPath().endsWith(".txt"))...
>
> This is why .jsp files are excluded.
>
> Keep in mind that JSP files are not pure HTML (not even close in most
> cases, especially when using JSF). I'm not sure what the built-in HTML
> parser will do with .jsp files. Generally content shouldn't be in the
> view layer, so indexing .jsp pages may or may not be useful. May I
> suggest switching to a Java web development framework that uses pure
> HTML templates? Tapestry - http://jakarta.apache.org/tapestry :)
>
> Erik
Oh, I see
However, for some reason, I have to make index for .jsp files. In
fact, I've rewritten IndexHTML and compiled a new class file, but I
don't know how to substitute it for the old one. Is there any way that
I can still make index for .jsp?
Thank you very much!
Benson
--
ankh wdj3 snb
"life, prosperity, health"
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: I can't make index for .jsp files with IndexHtml!
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Dec 5, 2004, at 1:36 AM, Benson Fang wrote:
> I got a problem: Everytime I try to make an index with IndexHtml for a
> directory under Tomcat webapps which includes .html and .jsp files, it
> only scans for .html files, but not .jsp files. However, it works
> while I make index with IndexFiles.
IndexHTML has this in its source code:
if (file.getPath().endsWith(".html") || // index .html files
file.getPath().endsWith(".htm") || // index .htm files
file.getPath().endsWith(".txt"))...
This is why .jsp files are excluded.
Keep in mind that JSP files are not pure HTML (not even close in most
cases, especially when using JSF). I'm not sure what the built-in HTML
parser will do with .jsp files. Generally content shouldn't be in the
view layer, so indexing .jsp pages may or may not be useful. May I
suggest switching to a Java web development framework that uses pure
HTML templates? Tapestry - http://jakarta.apache.org/tapestry :)
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org