- Posted by: vk guda
- Posted on: April 11 2001 03:31 EDT
I have one doubt How can we search our Files which are present in Public-html folder by using Keyword search.
Pls help me in this regard.
Presently i am working for a Portal Module. In that there is a small module for searching. There are some files in my public-html folder like (one.jsp, two.jsp etc..). Now i want to do search these files by keyword search.. If i type 't' and click the search button.. it must display all files which are starting with 't'...so that i can display that files as records in the other jsp file...can u give me a sample example (code) so that it can fulfill my purpose..
- How can we search File System in JSP..? by Choong Fui Shien on April 11 2001 21:13 EDT
If all u want 2 do is to search the html pages, take a look at this http://www.lucene.com/ This works pretty well. Although you may encounter difficulties with Asian languages
Hope this helps
i will do it...once again thank you for ur cooperation.
hi Choong Fui,
i tried http://www.lucene.com/ ..but i did not get wht i desired.. if u have any example pls provide me...
thanks for ur cooperation.
I misread the question. I thot u wanted to search the content of the files. What u want to do is to read the file names, right?
u can use the java.io.File object to list all the files, store it. U will have to implement a simple string search on the filenames.