源文件夹的 eclipse、wtp 和 tomcat 配置
我在 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技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请尝试使用部署程序集选项(项目属性 ---> 部署程序集)来配置要部署到 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
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.