• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Customisation in Directory Listing

 
Vignesh Babu M.J.
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell how to do customizing directory listing.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems to me there are two possibilities:
1. Create a custom version of Tomcat's defaultServlet with the desired presentation and set the "listings" parameter to "true". See the conf/web.xml for how this gets configured. You can also use a custom XSLT transform to customise directory listings.

2. Create a custom servlet mapped to a specific URL for only directory listings.

In any case you will be using methods in the java.io.File class - I suggest working with these outside the servlet environment first.

Bill
[ May 13, 2008: Message edited by: William Brogden ]
 
Vignesh Babu M.J.
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where the default servlet is located in tomcat. If we are creating custom default servlet where we have to put that file, whether in WEB-INF/classes area or anyother location. if possible can you give some sample code for that. that will be helpful for me.
Thanks for your reply.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The standard Tomcat installation comes with a "class-loader-howto.html" file under ../webapps/docs that tells all about where classes should go for various purposes.

Bill
 
Vignesh Babu M.J.
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks William Brogden
 
Edward He
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you may also want to check out "How do I customize directory listings?"
in page
http://tomcat.apache.org/tomcat-5.5-doc/default-servlet.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic