简体   繁体   English

Tomcat 登陆页面不在 localhost:8080 上

[英]Tomcat Landing Page not comming on localhost:8080

I created a Dynamic Web Project on Eclipse with the name JavaEEWebContent .我在 Eclipse 上创建了一个名为JavaEEWebContent的动态 Web 项目。 The file structure of the project looks something like this.项目的文件结构看起来像这样。

在此处输入图像描述

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 ).当我 go 链接http://localhost:8080/JavaEEWebContent/时,它工作正常并显示主页(在我的情况下它的index.html )。

The problem: When I go to http://localhost:8080 it shows问题:当我从 go 到http://localhost:8080它显示

在此处输入图像描述

I know that the landing page for http://localhost:8080 looks something like this:我知道http://localhost:8080的登录页面如下所示:

在此处输入图像描述

Any idea why it is not coming for me or what could go wrong?知道为什么它不适合我,或者 go 会出错吗?

Also I am using Tomcat 8.5.54 .我也在使用Tomcat 8.5.54

This is how my web.xml looks like if that helps:如果有帮助,这就是我的 web.xml 的样子:


<?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.请帮忙。

Nothing's wrong.什么都没有。 Eclipse is deploying your web application, and only your web application, when it launches Tomcat. Eclipse 正在部署您的 web 应用程序,并且仅在您的 web 应用程序启动时部署 Z8F72E28063C330C4F746 What you're expecting to see is a separate web application.您期望看到的是一个单独的 web 应用程序。 You'll find it in the web-app/ROOT folder of your downloaded copy of Tomcat.您可以在下载的 Tomcat 副本的 web-app/ROOT 文件夹中找到它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Tomcat 启动但主页无法打开,网址为 http://localhost:8080 - Tomcat starts but home page cannot open with url http://localhost:8080 Tomcat已启动,但本地主机8080不可用 - Tomcat started but localhost 8080 is not availble 我的 HTML 页面没有出现在 localhost:8080 上,而是 tomcat 欢迎页面正在显示 - My HTML page is not coming up on localhost:8080 instead tomcat welcome page is displaying Tomcat 7 未在浏览器上运行 (http://localhost:8080/) - Tomcat 7 is not running on browser(http://localhost:8080/ ) tomcat10主页无法通过键入localhost加载:8080错误:ERR_CONNECTION_REFUSED - tomcat10 home page can not load by typing localhost:8080 error: ERR_CONNECTION_REFUSED 如何直接在 localhost:8080 中打开我的 web 应用程序而不是 tomcat 主页 - How can I open my web application in localhost:8080 directly instead of tomcat home page Tomcat7(localhost:8080):404错误 - Tomcat7 (localhost:8080): 404 error 对于 Ubuntu 16.04 Docker 容器,无法在 localhost:8080 中访问 Tomcat 默认页面 - Can't reach Tomcat default page in localhost:8080 for Ubuntu 16.04 Docker container Apache Tomcat 在 localhost:8080 显示一个已经制作的 WAR 文件而不是主页 - Apache Tomcat is showing an already made WAR file instead of the home page at localhost:8080 如何在tomcat中部署Ldap war文件? 访问站点本地主机:8080 - How to deploy a Ldap war file in tomcat? to access site localhost:8080
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM