如何在 Eclipse Web 项目中将 WebContent 文件夹更改为不同的内容?

2022-01-20 00:00:00 ide eclipse

随着 Galileo 的发布,终于可以将普通的 Java 项目转换为动态的 Web 项目.不幸的是,它假定 Web 内容位于文件夹 WebContent 中,而现有项目不一定是这种情况.我怎样才能改变它?在 MyEclipse 中,这很容易,但使用股票 Eclipse,我找不到这样的选项!

With the Galileo release it is finally possible to convert a normal Java project to a dynamic web project. Unfortunately it assumes that the Web stuff is located in a folder WebContent, which is not necessarily the case for an existing project. How can I change it? In MyEclipse it is quite easy, but with a stock eclipse I don't find such an option!

推荐答案

我不确定您所说的股票日食"是什么意思,但 Helios 以非常直接的方式允许此功能:

  • 右键单击您的动态 Web 项目并打开属性".
  • 找到部署程序集,您应该可以从那里设置上下文路径.
  • I am not sure what you meant by "a stock eclipse", but Helios allows this functionality in a very straight-forward way:

  • Right click your dynamic web project and open "Properties".
  • Find Deployment Assembly and you should be able to set context paths from there.
  • 相关文章