简体   繁体   English

Eclipse 中动态 Web 项目的问题

[英]Issue with Dynamic Web Project in Eclipse

I have a Dynamic Web Project in Eclipse that should be auto-deployed to Tomcat (version 5.5) but it's not happening.我在 Eclipse 中有一个动态 Web 项目,应该自动部署到 Tomcat(版本 5.5),但它没有发生。 There are no build errors and the class files show up in the project in the workspace but they never get copied over to the Tomcat instance.没有构建错误,并且 class 文件显示在工作区的项目中,但它们从未被复制到 Tomcat 实例。 The project name is timex2 and I've tried several different default output folders but to no avail.项目名称是 timex2,我尝试了几个不同的默认 output 文件夹,但无济于事。 The default output folder is currently set to: timex2/WebContent/WEB-INF/classes.默认的output文件夹目前设置为:timex2/WebContent/WEB-INF/classes。

Here's the source tab from the build path:这是构建路径中的源选项卡:来源选项卡

Here's the project in the package explorer:这是 package 资源管理器中的项目:包资源管理器

Here's the directory structure of the project in windows explorer:这是 windows 资源管理器中项目的目录结构:

目录结构

Update: Here's the Markers Window:更新:这是标记 Window:

在此处输入图像描述

Eclipse will keep the files local to the project. Eclipse 会将文件保留在项目本地。 This allows for hot deploy when debugging and sharing a tomcat instance among multiple projects,etc.这允许在多个项目之间调试和共享 tomcat 实例时进行热部署等。 The local files will have everything needed for deployment, see all the xml files defined in your server inside eclipse. This is what is used to bootstrap Tomcat.本地文件将包含部署所需的一切,请参阅 eclipse 中服务器中定义的所有 xml 文件。这是用于引导 Tomcat 的文件。

If you want a quick way to check the runtime port just add an html file with soime markup at the root of the webapp, right click on it and say "run on server".如果你想要一种快速检查运行时端口的方法,只需在 webapp 的根目录添加一个带有 soime 标记的 html 文件,右键单击它并说“在服务器上运行”。 This should open the file up using the context root and you will be good to go on with your development.这应该使用上下文根打开文件,您可以继续进行开发 go。

Take a look at the "Deployment Assembly" tab under project preferences and see if things are being deployed into the tomcat directory like they should be查看项目首选项下的“部署程序集”选项卡,看看是否正在按应有的方式将内容部署到 tomcat 目录中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM