• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Welcome file list and directory listing

 
Manish Hatwalne
Ranch Hand
Posts: 2595
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not the regular simple problem. I have url pattern such as this -

http://myserver.com/known/aaa/bbb/NNNN/index.do

now this aaa, bbb & NNNN are unknown to me (NNNN is a physical directory though -- but there are several), and my servlet filter does the needful to dispatch the corrrect URL from this. Now my problem is -- when the user doesn't enter index.do at the end - it ends up showing the directory listing which I want to prevent and want to serve index.do page instead. I *cannot* add index.jsp in all those NNNN directories as they are generated on fly.

I have added following configuration to welcome-file list in my web.xml, but it doesn't serve index.do from there. What can I do to fix this?



TIA,
- Manish
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Don't use /index.do as the URL for the welcome file. You want it to be
<welcome-file>index.do</welcome-file>

2) What version of Tomcat are you using? I know in older versions there was a problem using non-physical files as welcome files. But this was fixed I think by Tomcat 5.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic