aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 39547
    
  27
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 - updated with new look and Ping home screen widget
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: retrive files in a directory
 
Similar Threads
Retrieval of files from Directory
Tomcat installation
loading images and sound files
how to use beanName
Regd.Document root