I am just getting started to learn about Web Apps and deploying them to Tomcat. So I started with a sample web app project – made up of struts, hibernate, etc., etc.
The ANT build was successful. Also, was able to deploy the web app through an xml under Catalina/host. I am able to open the web site with no issues.
This is the structure of my web app
-exploded -WEB-INF -classes -lib -web.xml -index.jsp -welcome.html
My question is
How does Tomcat know which is the first page / starting page / home page that it is supposed to open? Which file is this specified in?
In any web application, there will be a
web.xmlin theWEB-INF/folder.If you dont have one in your web app, as it seems to be the case in your folder structure, the default Tomcat
web.xmlis underTOMCAT_HOME/conf/web.xmlEither way, the relevant lines of the web.xml are
so any file matching this pattern when found will be shown as the home page.
In Tomcat, a web.xml setting within your web app will override the default, if present.
Further Reading
How do I override the default home page loaded by Tomcat?