在Tomcat的根目录部署我的应用程序 [英] Deploying my application at the root in Tomcat

查看:100
本文介绍了在Tomcat的根目录部署我的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的应用程序的war文件。我需要在根级别部署它。当前URL为 http:// localhost:8080 / war_name / application_name

I have the war file of my application. I need to deploy this at the root level. The current URL is http://localhost:8080/war_name/application_name.

推荐答案

您有几个选择:


  1. 删除开箱即用的 ROOT / 目录,并在部署之前将war文件重命名为 ROOT.war

  1. Remove the out-of-the-box ROOT/ directory from tomcat and rename your war file to ROOT.war before deploying it.

部署你的战争(来自你的例子) war_name.war 并配置 conf / server.xml 中的tomcat-8.0-doc / config / context.htmlrel =noreferrer>上下文根

Deploy your war as (from your example) war_name.war and configure the context root in conf/server.xml to use your war file :

<Context path="" docBase="war_name" debug="0" reloadable="true"></Context>


第一个更容易,但有点更多kludgy。第二个可能是更优雅的方式。

The first one is easier, but a little more kludgy. The second one is probably the more elegant way to do it.

这篇关于在Tomcat的根目录部署我的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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