Saturday, June 20, 2020

State the Home Page in a Java Web Project Using the web.xml welcome-file-list

The web.xml contains the Java server web serving instructions. And the <welcome-file-list /> states the files that will loaded if no page is declared when you're loading a site.  

Default Configuration
The default configuration loads pages in order of priority stated. And when nothing is found it will respond with a 404. 

Default Load Priority
1. index.html
2. index.html
3. index.htm
4. index.jsp

Example of the default WEB-INF/web.xml webapp config.
<web-app xmlns=""

	<!-- No <weclome-file-list/> stated for the default config -->


Add the welcome-file-list tag element to your web-app element and state the pages you would like to load as your home page when no page is declared like the configuration below.

Load My Pages in Order of:
1. index.html
2. index.jsp
3. home.jsp
4. help.jsp

Example of stating your own WEB-INF/web.xml welcome-file-list. 
<web-app xmlns=""

	<!-- Make your own welcome-file load priority -->


No comments:

Trying out the Dart Analysis Server

I wanted to see how the Dart Analysis Server was put together and worked. I started looking to see how I could wire it up and try out the co...