-
1. Re: welcome-file-list ignored in web.xml
p_d_austin Oct 22, 2001 12:08 PM (in response to alphafoo)The only time I have seen this is if you put the welcome-file-list tag in the wrong place in the web.xml file. Check out the dtd for the web.xml file and check you have it in the right place.
Paul -
2. Re: welcome-file-list ignored in web.xml
alphafoo Oct 22, 2001 4:17 PM (in response to alphafoo)Hmmm, I have it at the end of the file, right after servlet-mapping, and that seems consistent with the spec posted here: http://java.sun.com/j2ee/dtds/web-app_2_2.dtd
I have this at the end of my file...
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.m</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>home.m</welcome-file>
</welcome-file-list>
</web-app>
What else could it be? -
3. Re: welcome-file-list ignored in web.xml
alphafoo Oct 25, 2001 11:02 PM (in response to alphafoo)In case anyone else goes down this path, I finally figured out what was going wrong--- the welcome-file I specify (home.m) is an URL but not an actual file on the filesystem, which is what needs to be specified. Tomcat was looking for a home.m file, which didn't exist in the content directory, so it just gave up and showed the directory tree.
I guess the solution is to have an index.html file as the welcome file and just have it redirect to the /home.m URL. -
4. Re: welcome-file-list ignored in web.xml
tcabot Oct 26, 2001 2:37 PM (in response to alphafoo)Strangely enough, try creating a zero length home.m file. This worked for me.
-
5. Re: welcome-file-list ignored in web.xml
jcorbin Nov 27, 2002 4:16 PM (in response to alphafoo)I ran across a slightly different problem....I specified my welcome-file as index.jsp and verified the file existed in the correct location in the war file and I still get the directory listing. Does anyone have ideas why it would get ignored?
TIA