Eclipse - 使动态Web应用程序包含工作空间中的其他项目

时间:2013-07-25 10:16:55

标签: eclipse

我希望导出的.war文件在工作区中包含其他(引用的)项目。

当我仅在Build Path中引用它们时,它没有显示“Problems”,但是当我尝试“Run on Server”或导出时,会抛出ClassNotFoundException。

使用eclipse Kepler,tomcat 7.0.42。

我在这里看到了解决方案:Not able to configure run path for web application project in Eclipse workspace;这就是它现在的运作方式。有更便捷的方式吗?

1 个答案:

答案 0 :(得分:1)

您是否在Eclipse中运行Tomcat?试试这个:

  1. Run - > Run Configurations...(或Debug Configurations...)。
  2. 在左侧的Tomcat v7.0 Server at localhost下找到Apache Tomcat(或其为您命名的任何内容)。
  3. 转到右侧的Classpath标签。
  4. 选择User Entries,然后点击Add Projects...
  5. 选择您要包含的项目。
  6. 这应该将该项目放在Tomcat的类路径上。

相关问题