This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "retrive files in a directory" Watch "retrive files in a directory" New topic

retrive files in a directory

swetha deshmukh

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

Joined: Mar 22, 2005
Posts: 41062
For getting the list of files, check out the 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

Joined: Jul 08, 2003
Posts: 24183

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

Don't get me started about those stupid light bulbs.
subject: retrive files in a directory
Similar Threads
Tomcat installation
loading images and sound files
Regd.Document root
Retrieval of files from Directory
how to use beanName