Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

Server-side file browser using JSP

Thread view: 
Chris - 29 May 2006 22:25 GMT
I'd like to let users browse files on a server. They should be able to
navigate up and down the directory tree. (Yes, I know this is a security
risk, but that's what the app calls for). Does anyone have a pre-built JSP
component or page that will do it?

I could write it myself, but existing code might save a day or two...
Timo Stamm - 29 May 2006 23:09 GMT
Chris schrieb:
> I'd like to let users browse files on a server. They should be able to
> navigate up and down the directory tree. (Yes, I know this is a security
> risk, but that's what the app calls for). Does anyone have a pre-built JSP
> component or page that will do it?
>
> I could write it myself, but existing code might save a day or two...

Most Servlet containers can deliver static files like any other web
server. Like most other web servers, they can also list directories if
no index document is present. So you might be able to use this feature.

Just have a look at your servlet containers documentation and look for
an appropriate parameter. In Jetty, you can simply add the parameter
"dirAllowed" with the value "true" to the default servlet.

Timo


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.