为什么eclipse不正确地部署我的动态Web项目? [英] Why isn't eclipse deploying my Dynamic Web Project correctly?

查看:223
本文介绍了为什么eclipse不正确地部署我的动态Web项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是问题:我有一个源代码控制下的java动态Web项目,并在我的eclipse工作区中检出。之前,我能够在eclipse内在本地的Tomcat服务器上运行一个servlet。但是,我采取了一些修改,删除了一些文件,并添加了一些新的。

Here's the problem: I have a java "dynamic web project" under source control and checked out in my eclipse workspace. Before, I was able to run a servlet on a local Tomcat server from within eclipse. However, I pulled some changes which got rid of some files and added some new ones.

现在,Eclipse看起来不是将web应用程序部署到tomcat目录。我看了Eclipse以前部署它的文件夹(在.metadata下),但是没有任何东西被复制到那里了。我认为我的构建配置有问题,有什么可能的原因或步骤来解决问题?

Now Eclipse looks like it's not deploying the web app to the tomcat directory. I looked at the folder where Eclipse previously deployed it (under .metadata) but nothing gets copied there anymore. I figure there's something wrong with my build configuration, what are some possible causes or steps to go through to find out the problem?

然而,我可以使用我编写的Ant脚本部署/运行Web应用程序,并且在执行时可以正常工作。

I am however able to deploy/run the web app with an Ant script that I have written, and it works correctly when executed.

推荐答案

没有更多信息很难说。启动Tomcat时,首先检查控制台中的任何错误。问题如何表现出来,如果文件被复制,你会看到什么?如果我找不到具体的问题,有一些随意的东西/巫术仪式(有时候Eclipse只需要一点注意):

It's hard to say without more information. I'd start by checking any errors in console when starting Tomcat. How does the problem manifest, what got you looking if the files did get copied? If I'm unable to find a specific problem, there's some random stuff / voodoo rituals to try (sometimes Eclipse just needs a bit of attention):


  • 检查窗口/首选项,然后选择Java / Installed JRE和Server / Runtime环境。单击编辑,查看Eclipse是否报告任何错误。

  • 检查项目的构建路径 - 右键单击​​项目/构建路径/配置构建路径。浏览所有标签;任何红色需要修复。

  • 尝试打开W​​indow / Show视图,并查看错误日志(包含Eclipse错误)和问题(任何编译器警告/问题)。

  • 有时Project / Clean有助于。

  • 尝试右键单击服务器视图中的服务器,然后选择Clean。

  • 尝试启动eclipse -clean选项。

  • Check Window / Preferences and then Java / Installed JREs and Server / Runtime environments. Click on Edit, see if Eclipse reports any errors.
  • Check your project's build path - right click on Project / Build path / Configure build path. Go through all tabs; anything red needs fixing.
  • Try opening Window / Show view and look at both Error log (which contains Eclipse errors) and Problems (any compiler warnings/problems).
  • Sometimes Project / Clean helps.
  • Try right clicking on your server in Servers view and choosing Clean.
  • Try starting eclipse with -clean option.

这篇关于为什么eclipse不正确地部署我的动态Web项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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