Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

If I start my Tomcat server and try to display Tomcats default page, why do I see a directory listing or 404 error page?

0
Posted

If I start my Tomcat server and try to display Tomcats default page, why do I see a directory listing or 404 error page?

0

When creating Tomcat servers in WTP, the default is for the Tomcat server to use a separate instance from the Tomcat installation for reasons explained in this question. There is no attempt to serve the standard Web applications found in the installation. Instead, a simple “ROOT” Web application, containing just a minimal web.xml file, is provided as the default context. The URL “http://localhost:8080/” tries to display the welcome file at the base of this ROOT context. Since this ROOT context contains no welcome file, the default behavior for Tomcat is to display a directory listing. This is why you will see a directory listing for this URL with Tomcat 4.0, 4.1, and 5.0 servers. Directly listings have been disabled in Tomcat 5.5 and later, so the result is a 404 error page instead. To modify the Tomcat server in WTP to use the same server instance as the installation, see this question.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123