This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes retrive files in a directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "retrive files in a directory" Watch "retrive files in a directory" New topic
Author

retrive files in a directory

swetha deshmukh
Greenhorn

Joined: Jul 19, 2005
Posts: 9
Hi everyone,

How can i retrive the files in a directory and display in the text box all the files using jsp.

bye and thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
For getting the list of files, check out the java.io.File.listFiles method. For displaying them, you would iterate through the result of the listFiles call one by one, and write them inside a <textarea> tag.


Ping & DNS - my free Android networking tools app
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

This is not an advanced Java question. Moving to the JSP forum.


[Jess in Action][AskingGoodQuestions]
Srinivasa Kadiyala
Ranch Hand

Joined: Jun 10, 2004
Posts: 237
You can embed HTML Browse tag in jsp file and what ever is in the text field get it using getParameter().


Srini
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: retrive files in a directory
 
Similar Threads
Tomcat installation
how to use beanName
loading images and sound files
Regd.Document root
Retrieval of files from Directory