How can we search File System in JSP..?

Discussions

Web tier: servlets, JSP, Web frameworks: How can we search File System in JSP..?

  1. How can we search File System in JSP..? (4 messages)

    Hi,

      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..

    thanks

    guda.
  2. Hi
    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
  3. thank you


      i will do it...once again thank you for ur cooperation.


    guda.
  4. 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.

    thanks


    guda
  5. Hi
    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.