File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat Directory Listing Order Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Directory Listing Order" Watch "Tomcat Directory Listing Order" New topic

Tomcat Directory Listing Order

Jarin Letap

Joined: Aug 22, 2007
Posts: 1
I am using Tomcat to allow users to browse directories on a server. I have it setup currently and all is fine.

Although the default sort method on the files is by 'Last Modified' and ASC, which means users need to scroll all the way to the bottom.

Is there a way I can override the default sorting method for directory listings?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

I don't think there is.
I know there is a setting to disable directory listing in tomcat/conf/web.xml under the DefaultServlet entry.

Tomcat is open source so you can always look at the source for DefaultServlet.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Tomcat Directory Listing Order
It's not a secret anymore!