源文件夹的 eclipse、wtp 和 tomcat 配置

发布于 2024-12-03 23:40:57 字数 441 浏览 0 评论 0原文

我在 eclipse 中有一个 java 项目,它有其他项目的 jar 文件引用。 现在,我已经删除了这些jar文件并在eclipse中添加了项目,在eclipse中没有编译错误。我已经在eclipse中配置了Tomcat服务器。 但是当我添加项目而不是 jar 文件时,服务器不会加载。

我在 Eclipse 工作区中观察到以下路径:

<<Eclipse IDE workspace>>\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ESW\WEB-INF

在 WEB-INF 文件夹下,jar 文件和类文件位于。所有 jar 文件都加载到“jar”中,但在类文件夹下,该目录中不存在类文件。在这里,我期待的是我在源文件夹中添加的项目的类文件,而不是 jar 文件。我该怎么做?

I have a java project in eclipse which is having jar file reference of other projects.
Now, I have removed those jar files and added projects in eclipse, no compilation error in eclipse. I have configured Tomcat server in eclipse.
But server doesn't get loaded when i add project instead of jar files.

I have observed following path in eclipse workspace:

<<Eclipse IDE workspace>>\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ESW\WEB-INF

under WEB-INF folder, jar files and class files are located. All jar files are loaded to 'jar' but under classes folder no class files are present at this directory. here i am expecting class files of the project which i have added in source folder instead of jar files. how can i do it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

[浮城] 2024-12-10 23:40:57

请尝试使用部署程序集选项(项目属性 ---> 部署程序集)来配置要部署到 WTP Tomcat 的文件。在 eclipse 3.5 或之前的版本中,此选项的名称类似于 J2EE 模块依赖项

在此处输入图像描述

部署路径相对于您的 <>\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ESW\ 而源路径相对于您的项目文件夹。

Please try to use the Deployment Assembly option (Project Properties ---> Deployment Assembly ) to configure which files to be deployed to the WTP Tomcat . Before eclipse 3.5 or before , this option is called something likes J2EE Module Dependencies

enter image description here

Deploy path is relative to the your <<Eclipse IDE workspace>>\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ESW\ while source path is relative to your project folder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文