在没有 WAR 或 EAR 的情况下在 Tomcat 上部署 Java Web 项目

编程入门 行业动态 更新时间:2024-10-08 22:45:57
本文介绍了在没有 WAR 或 EAR 的情况下在 Tomcat 上部署 Java Web 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我有一个 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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 03:50:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1388926.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:情况下   项目   EAR   WAR   Web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!