Tomcat8 使用该应用程序作为 ROOT.war [英] Tomcat8 use the app as ROOT.war

查看:92
本文介绍了Tomcat8 使用该应用程序作为 ROOT.war的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 GoDaddy 服务器上使用 Tomcat7,为了将我的应用程序用作 ROOT 上下文,我删除了那里的 ROOT 文件夹并移动了我的应用程序我称之为 ROOT.war 并部署到 ROOT 文件夹.

I was working with Tomcat7 on GoDaddy server, and in order to use my app as the ROOT context, I deleted the ROOT folder that was there and moved my app which I called it ROOT.war and was deployed to ROOT folder.

我尝试了相同的方法,现在在 Amazon ubuntu 服务器上使用 tomcat8,但它不起作用.

I tried the same approach, now with tomcat8 on Amazon ubuntu server, but it doesn't work.

当我导航到 myip:8080/ 时,我在 javascript 控制台中收到错误,提示找不到它,导航到 myip:8080/index.html 给我一个空页面.

When I navigate to myip:8080/ I get error in the javascript console that it's not found and navigating to myip:8080/index.html gives me an empty page.

tomcat8 和 tomcat7 有什么区别?

What is the difference between tomcat8 and tomcat7?

推荐答案

您的应用网址是:

host:8443/yourApp/login.html

host:8443/yourApp/login.html

但你希望它像直播一样

host:8443/login.html

host:8443/login.html

如果是这种情况,则无需将其设为 ROOT.war

If this is the case then no need to make it as ROOT.war

您只需在 conf/server.xml 中添加一些行

you just add some line in conf/server.xml

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
    <Context docBase="usr/apache-tomcat/webapps/YourAppName" path="" reloadable="true" />
</Host>

然后你就点击了

主机:8443

在浏览器中有..

host:8443/login.html

host:8443/login.html

希望对你有帮助:)

这篇关于Tomcat8 使用该应用程序作为 ROOT.war的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆