在Tomcat / Eclipse中部署WAR [英] Deploying a WAR in Tomcat / Eclipse

查看:191
本文介绍了在Tomcat / Eclipse中部署WAR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Linux下使用Tomcat 6.0和Eclipse 3.0,我尝试在Tomcat中部署WAR。问题是,服务器是由Eclipse管理的,我已经部署了一些Eclipse项目。我尝试修改server.xml文件,然后通过Eclipse启动Tomcat,但不起作用:


无法加载Tomcat服务器配置at / Servers / Tomcat v6.0 Server在localhost-config。该配置可能已损坏或不完整。


我尝试提取webapps目录中的战争,但webapp仍然无法访问。

解决方案

是的,在某种程度上,您可以在开发模式下部署战争。



我有同样的问题。



我有一个Eclipse webapp项目,Eclipse部署到Eclipse运行的Tomcat实例,所以我可以热修改项目。



此Web项目需要使用资源由另一个必须在Tomcat的同一个实例中运行的webapp发布。另一个webapp是其他人完成的项目,所以它已经是一个战争形式。



我需要File->将战争导入Eclipse项目,让Eclipse将其部署到同一个Eclipse实例,以便在我的webapp运行的Tomcat的同一个实例中运行它。



问题是一些战争的工作这种方式,但其他一些没有,而所有这些都在独立的Tomcat(由startup.sh启动)中工作得很好。我不知道为什么。


I use Tomcat 6.0 and Eclipse 3.0 under Linux and I try to deploy a WAR in Tomcat. The problem is that the server is managed by Eclipse and I have some Eclipse project deployed. I tried to modify the server.xml file then launch Tomcat via Eclipse but it doesn't work:

Could not load the Tomcat server configuration at /Servers/Tomcat v6.0 Server at localhost-config. The configuration may be corrupt or incomplete.

I tried to extract the war in the webapps directory but the webapp is still inaccessible.

What is the best practice to deploy a War ?

解决方案

Yes, in a way, you can deploy a war in the dev mode.

I have the same problem.

I have an Eclipse webapp project, which Eclipse deploys to an instance of Tomcat run by Eclipse, so I can hot-edit the project.

This Web project needs to use resources published by another webapp that has to be run within the same instance of Tomcat. The other webapp is a completed project by someone else, so it is already in a war form.

I needed to File->Import the war as an Eclipse project and let Eclipse deploy it to the same instance of Eclipse, in order to run it in the same instance of Tomcat in which my webapp also runs.

The problem is that some wars work this way but some others do not, while all of them work perfectly fine in a stand-alone Tomcat (started by startup.sh). I can't figure out why.

这篇关于在Tomcat / Eclipse中部署WAR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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