• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Customisation in Directory Listing

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone tell how to do customizing directory listing.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks William Brogden
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic