[英]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.