What is welcome file list?

To display welcome files. Suppose instead of typing the URL like
www.bhabani.com/index.html
you want if any one types www.bhabani.com then the index.html page will open.
Here you have to give welcome file list in the DD.
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>

See there is no foreward slash before that page. Because the way in which container matches chooses the welcome files is not the same as the way in which it matches URL patterns.
Creating multiple welcome file,
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>default.jap</welcome-file>
</welcome-file-list>

Here the container search according to order. First checks for index.html if it does not find it then it searches for default.jsp.

No comments:

Post a Comment