在没有 WAR 或 EAR 的情况下在 Tomcat 上部署 Java Web 项目 [英] Deploy Java Web Project on Tomcat without WAR or EAR

查看:31
本文介绍了在没有 WAR 或 EAR 的情况下在 Tomcat 上部署 Java Web 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Java Web 项目 (Struts + Spring) 在我的本地主机上完美运行.我必须将它部署在我的网站上,但是网络主机给出的 Tomcat 管理器界面说由于安全原因它无法上传 WAR 文件.在联系技术支持时,我被告知无法上传 WAR,我应该尝试通过直接上传文件来部署我的项目(我有 FTP 访问权限).

I have a Java Web project (Struts + Spring) working perfectly in my localhost. I have to deploy it on my website, but the Tomcat Manager interface given by the webhost says it cannot upload a WAR file due to safety reasons. When contacting the tech support I was told it is not possible to upload a WAR and that I should try deploying my project by uploading the files directly (I have FTP access).

我的问题是,技术支持人员没有给出关于我应该把我的项目文件放在哪里的具体说明(我不知道它是否应该在 WAR 将被发送到的同一个文件夹中),也没有如何开始/停止它(一旦我上传文件,Tomcat 管理器会识别它吗?).

My problem is that no one at the tech support gave specific instructions on where I should put my project files (I don't know if it should be on de same folder the WAR would be sent to) neither how to start/stop it (Will the Tomcat Manager recognize it once I upload the files?).

推荐答案

你可以随时尝试上传一个war文件到tomcat的webapps文件夹中.

You can always try to upload a war file to webapps folder of tomcat.

如果 tomcat 在 autoDeploy 设置为 true 的情况下运行,它将自动部署您的应用程序.

if tomcat is running with autoDeploy set to true it will auto deploy your application.

我认为如果您将爆炸战争上传到网络应用程序也会发生同样的情况,上下文将是您放置文件的目录的名称.

i think that the same will happen if you upload the exploded war to the webapps, the context will be the name of the directory you put your files in.

这篇关于在没有 WAR 或 EAR 的情况下在 Tomcat 上部署 Java Web 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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