As a follow up to this question, can one specify the welcome pages without web.xml? If possible, how? If not possible, are welcome pages simply not used? If not used, what are the advantages and disadvantages?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can specify the welcome page without declare in web.xml. You use some html file and forward to your desire start page.see sample,
index.jsp
The index.jsp page forward to welcome.jsf page without declare to welcome-file-list tag in your web.xml.
Advantages of using welcome-file-list
When the URL request is a directory name, Application Server serves the first file specified in welcome-file-list element.
Disadvantages of without using welcome-file-list
If that welcome-file-list is not found, the server then tries the next file in the web.xml.Its taken more time and 404 error may be found.