Tomcat6 没有部署我的 web 应用程序

发布于 2024-10-16 12:02:02 字数 255 浏览 4 评论 0原文

我可以访问当前部署两个 Web 应用程序的 Tomcat 服务器。当我将自己的 webapp 放在 apache-tomcat-6.xxx/webapps 目录中时,它不会部署它。我尝试下载 Tomcat 示例 webapp,并将其部署在 webapps 目录中,但它仍然没有部署。

除了将 webapps 放入 apache*/webapps 目录中以进行部署之外,我还需要做些什么吗?我已经尝试过启动/重新启动 Tomcat,令人恶心。

谢谢,
克特姆

I have access to a Tomcat server that is currently deploy two webapps. When I put my own webapp in the apache-tomcat-6.xxx/webapps directory, it doesn't deploy it. I tried downloading the Tomcat sample webapp, and deployed it in the webapps directory, and it still doesn't deploy.

Is there anything I have to do beyond putting the webapps in the apache*/webapps directory to get them to deploy? I have tried starting/restarting Tomcat ad nauseam.

Thanks,
ktm

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

生生漫 2024-10-23 12:02:02

当你说你放置了自己的 webapp 时,我假设你正在放置你的 webapp.war 文件?确保在放置 webapp.war 之前先删除现有的 webapp 目录。 Tomcat 将自动扩展 war 文件以创建该 webapp 目录。

When you say you put your own webapp, I assume you are putting your webapp.war file? Make sure you delete the existing webapp directory first before you place webapp.war. Tomcat will automatically inflate the war file to create that webapp directory.

迷荒 2024-10-23 12:02:02

您是否尝试过停止并启动tomcat?

Did you try stopping and starting tomcat?

娇纵 2024-10-23 12:02:02

你的服务器启动了吗?如果是,那么您的项目目录将在 webapps 中创建。
还要查找环境变量。

Is your server getting started? And if yes than your project directory is created in webapps.
Also look for environment variable.

叹梦 2024-10-23 12:02:02

检查安全管理器是否正在运行。如果是,您将需要编辑 catalina.policy 文件以允许部署和访问您的 Web 应用程序。

Check to see if the security manager is running. If it is you will need to edit the catalina.policy file to allow your web application to be deployed and accessed.

°如果伤别离去 2024-10-23 12:02:02

如果从 eclipse 导出 .war 文件,请确保项目的动态 Web 模块构面版本不超过生产服务器可以处理的版本。例如,版本3.0适用于Tomcat 7,但不适用于Tomcat 6,需要将其设置为2.5。要将项目构面版本降低一个档次,请参阅 这个问题。

If you export your .war file from eclipse, make sure your project's dynamic web module facet version is not more than what your production server can handle. For example, version 3.0 works for Tomcat 7, but doesn't work on Tomcat 6, which needs it to be set as 2.5. To knock the project facet version down a notch, see this question.

三生殊途 2024-10-23 12:02:02

确保您的 war 文件的权限属于 tomcat 用户和组。确保先删除部署的目录,然后重新启动服务器。

$ sudo rm -fr /path/to/tomcat/webapps/

$ sudo chown tomcat:tomcat /path/to/tomcat/webapps/< /code>

现在重新启动服务器

Ensure that permissions on your war file belongs to the tomcat user and group. Make sure to remove the deployed directory first, and then restart the server.

$ sudo rm -fr /path/to/tomcat/webapps/<yourwebapp>

$ sudo chown tomcat:tomcat /path/to/tomcat/webapps/<yourwebapp.war>

Now restart the server

猫卆 2024-10-23 12:02:02

我在tomcat 6的部署系统上遇到了问题。由于某种原因,文件 $CATALINA_HOME/conf/Catalina/localhost/MyAppName.xml 的长度为零...我不确定是什么原因导致的,但我删除了零长度的 XML,删除了 WAR,然后我重复了部署过程(将 WAR 复制到 webapps 目录)并且部署正确。我在日志文件中找到了失败消息...现在我下次知道了,但我认为值得分享以防万一...

希望它有帮助...

I had a problem with tomcat 6's deployment system. For some reason the file $CATALINA_HOME/conf/Catalina/localhost/MyAppName.xml was zero-length... I'm not sure about what caused it, but I deleted the zero-lenght XML, deleted the WAR and then I repeated the deployment process (copied the WAR to the webapps directory) and it deployed correctly. I found the failure message in a log file... now I know it for the next time, but I though it would be worth to share just in case...

Hope it helps...

濫情▎り 2024-10-23 12:02:02

我也遇到这个问题,我重新下载tomcat并仔细检查service.xml,最后我发现我的WEB-INF/web.xml不存在。

i also meet the problem,i redownload tomcat and check service.xml carefully,finnally i find my WEB-INF/web.xml not exsit.

甜心小果奶 2024-10-23 12:02:02

我面临的问题是正在运行的 java 进程太多。不知何故,它没有让 Tomcat 启动,也没有抛出任何错误。

为此,我杀死了所有 java 进程,然后重新启动 Tomcat,它就工作了。

在Linux中:

> ps -aux | grep java
> kill -9 [pid_from_last_command]

The problem that I faced was there were too many java processes that were running. Somehow it was not letting Tomcat start and did not throw any error.

For that I killed all the java processes and then restarted the Tomcat and it worked.

In Linux:

> ps -aux | grep java
> kill -9 [pid_from_last_command]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文