If the user gives the file path and search string in a jsp page, I believe it will be processed in sever, right? In that case the user needs to know the path of the file located in server. As far as retrieving the details are concerned,
you should have a
servlet, this should be invoked when user submits the jsp page, and in your servlet you can use getParameter method of request object to retrieve the details like file name and search string.