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