DockYard
DockYard

Reputation: 1040

Tomcat Landing Page not comming on localhost:8080

I created a Dynamic Web Project on Eclipse with the name JavaEEWebContent. The file structure of the project looks something like this.

enter image description here

After compiling when I do a "Run on Server", it runs fine.

When I go the link http://localhost:8080/JavaEEWebContent/, it works fine and displays me the homepage(in my case its index.html).

The problem: When I go to http://localhost:8080 it shows

enter image description here

I know that the landing page for http://localhost:8080 looks something like this :

enter image description here

Any idea why it is not coming for me or what could go wrong?

Also I am using Tomcat 8.5.54.

This is how my web.xml looks like if that helps:


<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">

    <welcome-file-list>
        <welcome-file>index3.html</welcome-file>
        <welcome-file>index2.html</welcome-file>
        <welcome-file>index2.html</welcome-file>
    </welcome-file-list>



    <servlet>
        <servlet-name>addNumbers</servlet-name>
        <servlet-class>com.servlet.addNumbers.AddNumbers</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>addNumbers</servlet-name>
        <url-pattern>/addNumbers</url-pattern>
    </servlet-mapping>


</web-app>

Please help.

Upvotes: 1

Views: 643

Answers (1)

nitind
nitind

Reputation: 20003

Nothing's wrong. Eclipse is deploying your web application, and only your web application, when it launches Tomcat. What you're expecting to see is a separate web application. You'll find it in the web-app/ROOT folder of your downloaded copy of Tomcat.

Upvotes: 1

Related Questions