Server-side file browser using JSP

C

Chris

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...
 
T

Timo Stamm

Chris said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top